Autor Wątek: CALL INCHL  (Przeczytany 397 razy)

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
CALL INCHL
« dnia: 2021.10.12, 00:05:17 »
Witajcie,

ZX Spectrum jest względnie prostą platformą sprzętową, ale jednym z elementów, który do dziś spędza sen z powiek adeptom sztuki programowania w assemblerze, jest organizacja pamięci ekranu. Kiedyś analizując kod jednej gier kolega natknął się na taką oto procedurę, którą roboczo nazywaliśmy INCHL:

INCHL INC H
        LD  A,H
        AND 7
        RET NZ
        LD  A,L
        ADD A,32
        LD  L,A
        RET C
        LD  A,H
        SUB 8
        LD  H,A
        RET

Procedura dla podanego w parze rejestrów HL adresu ekranu zwraca adres bajtu znajdującego się w linii poniżej .... nasze życie było od tego czasu dużo prostsze. Mam nadzieję, że też Wam się przyda :)

Tygrys

  • Administrator
  • *****
  • Wiadomości: 4327
  • Miejsce pobytu:
    Warszawa
  • mistrz ceremonii
Odp: CALL INCHL
« Odpowiedź #1 dnia: 2021.10.12, 09:46:30 »
Dzięki zapodzielenie się hintem! Dodam że procedura działa również dla banków pamięci dla 128k.

matofesi

  • *****
  • Wiadomości: 1888
  • Miejsce pobytu:
    Toruń/Poland
Odp: CALL INCHL
« Odpowiedź #2 dnia: 2021.10.12, 09:57:55 »
Pamiętam, że u nas procedura nazywała się z jakiegoś powodu NEXTHL ;)
Ma tylko jedną wadę - za uniwersalność płacimy szybkością. Nic nie przebije tablicy albo odpowiednio zoptymalizowanego kodu, ale jeśli potrzebujemy takiego uniwersalnego rozwiązania, które można po prostu wywołać z dowolnego miejsca nie przejmując się specjalnie czasem wykonania to procedurka jest bardzo przydatna :)

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
Odp: CALL INCHL
« Odpowiedź #3 dnia: 2021.10.12, 15:12:52 »
... żeby umieścić zacytowaną przeze mnie procedurę w kontekście dla początkujących, zamieszczam poniżej fragment kodu wyświetlającego kontrowersyjno-pojednawczy obrazek (do skompilowania pod PASMO).

Z uwagi na chęć wykorzystania komendy LDI do transferu danych, procedura INC_HL zmieniła się w INC_DE:

    org 32768

start:
    di
    ld  hl, img
    ld  de, 16384
    ld  bc, 192*32
loop:
    push de

    ; copy one image line
    rept 32
    ldi                    ; (HL) --byte--> (DE), HL++, DE++, BC--
    endm

    pop de
    call inc_de

    ld  a, b
    or  c
    jr  nz, loop

    ; loop forever at the end
stop:
    jp  stop

inc_de:
    inc d
    ld  a, d
    and 7
    ret nz
    ld  a, e
    add a,32
    ld  e, a
    ret c
    ld  a, d
    sub 8
    ld  d, a
    ret

img:
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$F3,$FF,$FF,$CF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$F3,$FF,$FF,$CF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$07,$FF,$F3,$FF,$FF,$CF,$FF,$E0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$07,$FF,$F3,$FF,$FF,$CF,$FF,$E0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$07,$FF,$F3,$FF,$FF,$CF,$FF,$E0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$F3,$FF,$FF,$CF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$F3,$FF,$FF,$CF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$F3,$FF,$FF,$CF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$1F,$FF,$F3,$FF,$FF,$CF,$FF,$F8,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$1F,$FF,$E3,$FF,$FF,$C7,$FF,$F8,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$3F,$FF,$E3,$FF,$FF,$C7,$FF,$FC,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$3F,$FF,$E3,$FF,$FF,$C7,$FF,$FC,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$7F,$FF,$E3,$FF,$FF,$C7,$FF,$FE,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$C3,$FF,$FF,$C3,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$C3,$FF,$FF,$C3,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$01,$FF,$FF,$C3,$FF,$FF,$C3,$FF,$FF,$80,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$FF,$83,$FF,$FF,$C1,$FF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$FF,$83,$FF,$FF,$C1,$FF,$FF,$C0,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$07,$FF,$FF,$03,$FF,$FF,$C0,$FF,$FF,$E0,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$03,$FF,$FF,$C0,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$1F,$FF,$FE,$03,$FF,$FF,$C0,$7F,$FF,$F8,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$3F,$FF,$FE,$03,$FF,$FF,$C0,$7F,$FF,$FC,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$7F,$FF,$FC,$03,$FF,$FF,$C0,$3F,$FF,$FE,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FC,$03,$FF,$FF,$C0,$3F,$FF,$FF,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$01,$FF,$FF,$F8,$03,$FF,$FF,$C0,$1F,$FF,$FF,$80,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$03,$FF,$FF,$F0,$03,$FF,$FF,$C0,$0F,$FF,$FF,$C0,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$F0,$03,$FF,$FF,$C0,$0F,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$1F,$FF,$FF,$E0,$03,$FF,$FF,$C0,$07,$FF,$FF,$F8,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$3F,$FF,$FF,$C0,$03,$FF,$FF,$C0,$03,$FF,$FF,$FC,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$80,$03,$FF,$FF,$C0,$01,$FF,$FF,$FF,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$03,$FF,$FF,$FF,$80,$03,$FF,$FF,$C0,$01,$FF,$FF,$FF,$C0,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$07,$FF,$FF,$FF,$00,$03,$FF,$FF,$C0,$00,$FF,$FF,$FF,$E0,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$1F,$FF,$FF,$FE,$00,$03,$FF,$FF,$C0,$00,$7F,$FF,$FF,$F8,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$7F,$FF,$FF,$FC,$00,$03,$FF,$FF,$C0,$00,$3F,$FF,$FF,$FE,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$03,$FF,$FF,$FF,$F8,$00,$03,$FF,$FF,$C0,$00,$1F,$FF,$FF,$FF,$C0,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$0F,$FF,$FF,$FF,$F0,$00,$03,$FF,$FF,$C0,$00,$0F,$FF,$FF,$FF,$F0,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$7F,$FF,$FF,$FF,$E0,$00,$03,$FF,$FF,$C0,$00,$07,$FF,$FF,$FF,$FE,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$03,$FF,$FF,$FF,$FF,$C0,$00,$03,$FF,$FF,$C0,$00,$03,$FF,$FF,$FF,$FF,$C0,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$3F,$FF,$FF,$FF,$FF,$00,$00,$03,$FF,$FF,$C0,$00,$00,$FF,$FF,$FF,$FF,$FC,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$FE,$00,$00,$03,$FF,$FF,$C0,$00,$00,$7F,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$FC,$00,$00,$03,$FF,$FF,$C0,$00,$00,$3F,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$E0,$00,$00,$03,$FF,$FF,$C0,$00,$00,$07,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$80,$00,$00,$03,$FF,$FF,$C0,$00,$00,$01,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FF,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$FF,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$FC,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$3F,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$F0,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$0F,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$C0,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$03,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$FF,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$FF,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$F8,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$1F,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$E0,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$07,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$FF,$00,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$00,$FF,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$F8,$00,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$00,$1F,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$80,$00,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$00,$01,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$F0,$00,$00,$00,$00,$00,$00,$03,$FF,$FF,$C0,$00,$00,$00,$00,$00,$00,$0F,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$01,$F8,$00,$FF,$FF,$FF,$FF,$00,$3F,$00,$00,$00,$1F,$FE,$00,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$03,$FE,$00,$FF,$FF,$FF,$FF,$00,$FF,$C0,$00,$00,$FF,$FF,$E0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$0F,$FF,$00,$FF,$FF,$FF,$FF,$01,$FF,$E0,$00,$03,$FF,$FF,$F8,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$0F,$FF,$80,$FF,$FF,$FF,$FF,$03,$FF,$F0,$00,$03,$FF,$FF,$FE,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$1F,$FF,$C0,$FF,$FF,$FF,$FF,$03,$FF,$F0,$00,$07,$FF,$FF,$FF,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$1F,$FF,$C0,$FF,$FF,$FF,$FF,$07,$FF,$F0,$00,$07,$FF,$FF,$FF,$80,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$3F,$FF,$C0,$FF,$FF,$FF,$FF,$07,$FF,$F8,$00,$0F,$FF,$FF,$FF,$C0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$3F,$FF,$E0,$FF,$FF,$FF,$FF,$07,$FF,$F8,$00,$0F,$FF,$FF,$FF,$E0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$3F,$FF,$E0,$00,$1F,$F8,$00,$0F,$FF,$FC,$00,$0F,$FC,$01,$FF,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$7F,$FF,$F0,$00,$1F,$F8,$00,$0F,$FF,$FC,$00,$0F,$FC,$00,$7F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$7F,$FF,$F0,$00,$1F,$F8,$00,$0F,$FF,$FE,$00,$0F,$FC,$00,$3F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$7F,$FF,$F0,$00,$1F,$F8,$00,$1F,$FF,$FE,$00,$0F,$FC,$00,$3F,$F8,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$FF,$FF,$F8,$00,$1F,$F8,$00,$1F,$FF,$FE,$00,$0F,$FC,$00,$1F,$F8,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$FF,$DF,$F8,$00,$1F,$F8,$00,$3F,$FF,$FF,$00,$0F,$FC,$00,$1F,$F8,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$FF,$DF,$FC,$00,$1F,$F8,$00,$3F,$FB,$FF,$00,$0F,$FC,$00,$1F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$01,$FF,$DF,$FC,$00,$1F,$F8,$00,$3F,$F3,$FF,$80,$0F,$FC,$00,$3F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$01,$FF,$8F,$FC,$00,$1F,$F8,$00,$7F,$F3,$FF,$80,$0F,$FC,$00,$7F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$03,$FF,$8F,$FE,$00,$1F,$F8,$00,$7F,$E1,$FF,$80,$0F,$FC,$00,$FF,$E0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$03,$FF,$87,$FE,$00,$1F,$F8,$00,$7F,$E1,$FF,$C0,$0F,$FC,$0F,$FF,$E0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$03,$FF,$07,$FF,$00,$1F,$F8,$00,$FF,$E0,$FF,$C0,$0F,$FC,$3F,$FF,$C0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$07,$FF,$07,$FF,$00,$1F,$F8,$00,$FF,$C0,$FF,$E0,$0F,$FC,$7F,$FF,$80,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$07,$FE,$03,$FF,$00,$1F,$F8,$00,$FF,$C0,$FF,$E0,$0F,$FC,$FF,$FF,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$07,$FE,$03,$FF,$80,$1F,$F8,$01,$FF,$C0,$7F,$E0,$0F,$FD,$FF,$FC,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$0F,$FE,$01,$FF,$80,$1F,$F8,$01,$FF,$80,$7F,$F0,$0F,$FD,$FF,$F0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$0F,$FF,$FF,$FF,$C0,$1F,$F8,$03,$FF,$FF,$FF,$F0,$0F,$FD,$FF,$C0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$0F,$FF,$FF,$FF,$C0,$1F,$F8,$03,$FF,$FF,$FF,$F8,$0F,$FC,$FF,$C0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$1F,$FF,$FF,$FF,$C0,$1F,$F8,$03,$FF,$FF,$FF,$F8,$0F,$FC,$FF,$E0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$1F,$FF,$FF,$FF,$E0,$1F,$F8,$07,$FF,$FF,$FF,$F8,$0F,$FC,$7F,$F0,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$3F,$FF,$FF,$FF,$E0,$1F,$F8,$07,$FF,$FF,$FF,$FC,$0F,$FC,$3F,$F8,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$3F,$FF,$FF,$FF,$F0,$1F,$F8,$07,$FF,$FF,$FF,$FC,$0F,$FC,$1F,$F8,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$3F,$FF,$FF,$FF,$F0,$1F,$F8,$0F,$FF,$FF,$FF,$FE,$0F,$FC,$0F,$FC,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$7F,$F0,$00,$3F,$F0,$1F,$F8,$0F,$FC,$00,$0F,$FE,$0F,$FC,$0F,$FE,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$7F,$E0,$00,$3F,$F8,$1F,$F8,$0F,$FC,$00,$07,$FE,$0F,$FC,$07,$FF,$00,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$7F,$E0,$00,$1F,$F8,$1F,$F8,$1F,$FC,$00,$07,$FF,$0F,$FC,$03,$FF,$80,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$FF,$E0,$00,$1F,$FC,$1F,$F8,$1F,$F8,$00,$03,$FF,$0F,$FC,$01,$FF,$80,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$FF,$C0,$00,$0F,$FC,$1F,$F8,$3F,$F8,$00,$03,$FF,$8F,$FC,$00,$FF,$C0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$01,$FF,$C0,$00,$0F,$FC,$1F,$F8,$3F,$F8,$00,$01,$FF,$8F,$FC,$00,$FF,$E0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$01,$FF,$C0,$00,$0F,$FE,$1F,$F8,$3F,$F0,$00,$01,$FF,$8F,$FC,$00,$7F,$F0,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$01,$FF,$80,$00,$07,$FE,$1F,$F8,$7F,$F0,$00,$01,$FF,$CF,$FC,$00,$3F,$F8,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$80,$00,$07,$FF,$1F,$F8,$7F,$E0,$00,$00,$FF,$CF,$FC,$00,$1F,$FC,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$03,$FF,$00,$00,$03,$FF,$1F,$F8,$7F,$E0,$00,$00,$FF,$C7,$FC,$00,$0F,$FC,$FF,$C0,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$0F,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    db  $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
    end 32768

wynik


tooloud

  • *****
  • Wiadomości: 3022
  • Miejsce pobytu:
    Warszawa
  • mydłem go!
Odp: CALL INCHL
« Odpowiedź #4 dnia: 2021.10.12, 15:19:05 »
... ale to zastosowanie to tak trochę nie do końca rozumiem z tego przykładu powyżej, przecież wystarczy odpowiednio zakodować (zapisać) obrazek, żeby to ogarnąć prostym kopiowaniem 1:1 obszaru danych bez amby przeliczeń??
dużo sprzętu mało czasu.

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
Odp: CALL INCHL
« Odpowiedź #5 dnia: 2021.10.12, 15:30:03 »
wiem wiem ... to prawda jeśli obrazek jest pełnoekranowy (jak w podanym przykładzie), ale korzystając z tej metody można byłoby np. wyświetlić mniejszy obrazek w prawym dolnym rogu ekranu, co już nie jest takie proste przy kopiowaniu 1:1

matofesi

  • *****
  • Wiadomości: 1888
  • Miejsce pobytu:
    Toruń/Poland
Odp: CALL INCHL
« Odpowiedź #6 dnia: 2021.10.12, 15:43:09 »
No właśnie o to chodzi, że procedura ma sens jeśli potrzebujesz przerzucić liniową grafikę w ekran mając tylko adres początkowy. Jeśli przerzucamy w różne miejsca trudne do przewidzenia (sprite'y w grze albo coś podobnego), to wtedy ma sens. Jeśli przerzucamy w miejsca, które da się z góry zaplanować to albo piszemy kod tak, żeby szybciutko przerzucał uwzględniając fakt, że wiemy gdzie albo robimy tablicę i przerzucamy według stablicowanych adresów.

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
Odp: CALL INCHL
« Odpowiedź #7 dnia: 2021.10.12, 15:53:56 »
Zgadzam się ze wszystkim co piszecie.

Moim głównym celem było pokazanie procedury w pewnym kontekście w ramach zamkniętego przykładu, który osoby początkujące mogą skopiować i skompilować do pliku .TAP, a następnie pobawić się trochę modyfikując np. parametry.

Sam przy tym miałem trochę zabawy, bo ten obrazek znalazłem w formacie PNG, więc musiałem go przeskalować w GIMP-ie do odpowiedniego formatu i skonwertować kolory do B/W. Następnie wyeksportowałem obrazek do struktury w ANSI C (nie wiedziałem, że GIMP ma taką opcję) i napisałem prosty program w C, który generuje sekwencję poleceń DW z obrazkiem :)

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
Odp: CALL INCHL
« Odpowiedź #8 dnia: 2021.10.12, 18:40:02 »
pod wpływem krytyki, ośmieliłem się trochę zmienić kod i wprowadzić logo w ruch ;)

    org 32768

start:
    ; clear screen
    ld  hl, 16384
    ld  de, 16385
    ld  bc, 6143
    ld  (hl), 0
    ldir

    ;; red ink color
    ld   hl, 22528
    ld   de, 22529
    ld   bc, 767
    ld   (hl), %01000010
    ldir

    ;; black border
    xor a
    out(254), a

    ld  ix, tab
anim:
    halt

again:
    ld  a, (ix+0)
    cp  255
    jr  nz, next
    ld  ix, tab
    jr  again

next:
    inc ix

    ld  b, a
    ld  de, 16384 + 1920 + 8
move:
    call inc_de
    djnz move                           ; should use table instead repeated call to inc_de :(

    ld  hl, img
    ld  bc, 128*16
loop:
    push de

    ; copy one image line
    rept 16
    ldi                    ; (HL) --byte--> (DE), HL++, DE++, BC--
    endm

    pop de
    call inc_de

    ld  a, b
    or  c
    jr  nz, loop

    jp  anim

inc_de:
    inc d
    ld  a, d
    and 7
    ret nz
    ld  a, e
    add a,32
    ld  e, a
    ret c
    ld  a, d
    sub 8
    ld  d, a
    ret

tab:
    ; generated with following Python snippet:
    ;   > 'db ' + ','.join(map(lambda i:str(15-int(15*abs(math.sin(3.14*i/31)))), range(32)))
    db 15,14,12,11,10,8,7,6,5,4,3,2,1,1,1,1,1,1,1,1,2,3,4,5,6,7,8,10,11,12,14,15
    db 255

img:
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $00, $60, $06, $00, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $00, $60, $06, $00, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FE, $00, $60, $06, $00, $7F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FE, $00, $60, $06, $00, $7F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FC, $00, $E0, $07, $00, $3F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F8, $00, $E0, $07, $00, $1F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F0, $01, $E0, $07, $80, $0F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F0, $01, $E0, $07, $80, $0F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $E0, $01, $E0, $07, $80, $07, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $C0, $03, $E0, $07, $C0, $03, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $80, $07, $E0, $07, $E0, $01, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $00, $07, $E0, $07, $E0, $00, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FC, $00, $0F, $E0, $07, $F0, $00, $3F, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $F8, $00, $1F, $E0, $07, $F8, $00, $1F, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $E0, $00, $1F, $E0, $07, $F8, $00, $07, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $00, $3F, $E0, $07, $FC, $00, $01, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FE, $00, $00, $7F, $E0, $07, $FE, $00, $00, $7F, $FF, $C0, $00
DB $00, $03, $FF, $F0, $00, $00, $FF, $E0, $07, $FF, $00, $00, $0F, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $01, $FF, $E0, $07, $FF, $80, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $03, $FF, $E0, $07, $FF, $C0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $07, $FF, $E0, $07, $FF, $E0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $0F, $FF, $E0, $07, $FF, $F0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $3F, $FF, $E0, $07, $FF, $FC, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $7F, $FF, $E0, $07, $FF, $FE, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $01, $FF, $FF, $E0, $07, $FF, $FF, $80, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $07, $FF, $FF, $E0, $07, $FF, $FF, $E0, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $1F, $FF, $FF, $E0, $07, $FF, $FF, $F8, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $FF, $FF, $FF, $E0, $07, $FF, $FF, $FF, $07, $FF, $C0, $00
DB $00, $03, $FF, $E7, $FF, $FF, $FF, $E0, $07, $FF, $FF, $FF, $E7, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $F1, $F0, $00, $0F, $8F, $FF, $80, $FF, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $C0, $F0, $00, $0F, $07, $FF, $00, $3F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $C0, $70, $00, $0E, $03, $FE, $00, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $70, $00, $0E, $03, $FC, $00, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $70, $00, $0C, $01, $FC, $00, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $30, $00, $0C, $01, $FC, $00, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $3F, $81, $FC, $01, $FC, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $3F, $81, $FC, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $1F, $81, $F8, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $1F, $81, $F8, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $1F, $81, $F8, $20, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $1F, $81, $F0, $20, $7C, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $0F, $81, $F0, $20, $7C, $1C, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $0C, $0F, $81, $F0, $30, $7C, $18, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $0E, $0F, $81, $F0, $70, $3C, $10, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $0E, $07, $81, $E0, $70, $3C, $00, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $00, $07, $81, $E0, $00, $3C, $00, $7F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $00, $07, $81, $E0, $00, $1C, $10, $7F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $E0, $00, $1C, $10, $3F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $C0, $00, $1C, $18, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $C0, $00, $1C, $18, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $83, $81, $C1, $FC, $0C, $1C, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $81, $81, $81, $FC, $0C, $1E, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $81, $81, $81, $FE, $0C, $1E, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $7F, $C1, $81, $81, $FE, $04, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $7F, $C0, $81, $83, $FE, $04, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $7F, $C0, $81, $03, $FF, $04, $1F, $81, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $FF, $E0, $C3, $07, $FF, $06, $1F, $C1, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00

    end 32768

tooloud

  • *****
  • Wiadomości: 3022
  • Miejsce pobytu:
    Warszawa
  • mydłem go!
Odp: CALL INCHL
« Odpowiedź #9 dnia: 2021.10.12, 18:55:51 »
a teraz na boki niech się rusza :)
dużo sprzętu mało czasu.

ZX Freeq

  • *****
  • Wiadomości: 1754
  • Miejsce pobytu:
    Warszawa
Odp: CALL INCHL
« Odpowiedź #10 dnia: 2021.10.12, 18:57:57 »
a teraz na boki niech się rusza :)

Nie, niech upadnie na bok ;P
A serio, to dzięki za kod i podzielenie się/
ZX80|ZX81+16kB+PandAY|ZX 48k/+/128k+/+2/+2A/+3/Vega/Next|QL+QIDE|JS128|Timex 2048+2040|UK2086|FDD3000+3.5''|AY|ZX HD|Divide2k11/2k14|DivMMC/PicoDivSD|BetaDisk 128|Opus|Masakrator FM|If 1/2/Microdrv|Multiface 1|+2A\B SDI-1|SJS 1/2|ZX Printer|TZXDuino|+3 HxC USB|ZXUno|Omni
Z88|A500/600|PC200|Ent128

sachy

  • ***
  • Wiadomości: 104
  • Miejsce pobytu:
    Earth, Solar System
Odp: CALL INCHL
« Odpowiedź #11 dnia: 2021.10.12, 19:34:31 »
Fajnie poczytać taki zacny wątek i zobaczyć wersje innych. U mnie tablica, ale ten przykład może być pożyteczny w "małych formach".

Dzięki i pozdro.

appblue

  • *
  • Wiadomości: 13
  • Miejsce pobytu:
    Poland
Odp: CALL INCHL
« Odpowiedź #12 dnia: 2021.10.12, 21:58:10 »
jest na boki ... niestety widać linię rastra, więc jeszcze do popracowania :)

    org 32768

start:
    ; clear screen
    ld  hl, 16384
    ld  de, 16385
    ld  bc, 6143
    ld  (hl), 0
    ldir

    ;; red ink color
    ld   hl, 22528
    ld   de, 22529
    ld   bc, 767
    ld   (hl), %01000010
    ldir

    ;; black border
    xor a
    out(254), a

    call prep_shifted_images

    ld  ix, tab_y
    ld  iy, tab_x
anim:

    ; xor a
    ; out (254), a
    halt
    ; ld a,1
    ; out (254), a


again:
    ld  a, (ix+0)
    cp  255
    jr  nz, next
    ld  ix, tab_y
    jr  again

next:
    inc ix

    ld  b, a
    ld  de, 16384 + 4
move:
    call inc_de
    djnz move

    push de

    ; ld  hl, img_shift
    ; calculate the shift address based on the number in accumulator

againx:
    ld a, (iy+0)
    cp 255
    jr nz, nextx
    ld iy, tab_x
    jr againx
nextx:

    ld hl,  img_shift
    add a,  a           ; * 2
    add a,  a           ; * 4
    add a,  a           ; * 8
    ld  d,  a
    ld  e,  0
    add hl, de
    ld  d, 0
    ld  e, (iy+1)
    inc iy
    inc iy

    ex  de, hl
    pop bc
    add hl, bc
    ex  de, hl

    ld  bc, 2048

loop:
    push de

    ; copy one image line
    rept 16
    ldi                    ; (HL) --byte--> (DE), HL++, DE++, BC--
    endm

    pop de

;   call inc_de
;   converted to inline function from CALL ... RET
    inc d
    ld  a, d
    and 7
    jr nz, .n01
    ld  a, e
    add a,32
    ld  e, a
    jr c, .n01
    ld  a, d
    sub 8
    ld  d, a
.n01:

    ld  a, b
    or  c
    jr  nz, loop

    jp  anim

inc_de:
    inc d
    ld  a, d
    and 7
    ret nz
    ld  a, e
    add a,32
    ld  e, a
    ret c
    ld  a, d
    sub 8
    ld  d, a
    ret

mem: db 0

prep_shifted_images:

; copy first image without shift
    ld  hl, img
    ld  de, img_shift
    ld  bc, 2048
    ldir

    ld  b, 7
    ld  hl, img_shift
    ld  de, img_shift + 2048
.l01:
    push bc

    push de
    push de

    ; copy previous version
    push de
    ld bc, 2048
    ldir
    pop  hl

    ; shift current version
    scf
    ccf
    rept 2048
        rr  (hl)
        inc hl
    endm

    pop hl          ; calculate next image at DE + 2048
    ld  de, 2048
    add hl, de
    ex  de, hl      ; set DE
    pop hl          ; set de to previous DE

    pop bc
    dec b
    ld  a,b
    jp nz, .l01

    ret

tab_x:
        db      0,0
        db      1,0
        db      2,0
        db      3,0
        db      4,0
        db      5,0
        db      6,0
        db      7,0
        db      0,1
        db      1,1
        db      2,1
        db      3,1
        db      4,1
        db      5,1
        db      6,1
        db      7,1
        db      0,2
        db      1,2
        db      2,2
        db      3,2
        db      4,2
        db      5,2
        db      6,2
        db      7,2
        db      0,3
        db      1,3
        db      2,3
        db      3,3
        db      4,3
        db      5,3
        db      6,3
        db      7,3
        db      0,4
        db      1,4
        db      2,4
        db      3,4
        db      4,4
        db      5,4
        db      6,4
        db      7,4
        db      0,5
        db      1,5
        db      2,5
        db      3,5
        db      4,5
        db      5,5
        db      6,5
        db      7,5
        db      0,6
        db      1,6
        db      2,6
        db      3,6
        db      4,6
        db      5,6
        db      6,6
        db      7,6
        db      0,7
        db      1,7
        db      2,7
        db      3,7
        db      4,7
        db      5,7
        db      6,7
        db      7,7
        db      0,8
        db      7,7
        db      6,7
        db      5,7
        db      4,7
        db      3,7
        db      2,7
        db      1,7
        db      0,7
        db      7,6
        db      6,6
        db      5,6
        db      4,6
        db      3,6
        db      2,6
        db      1,6
        db      0,6
        db      7,5
        db      6,5
        db      5,5
        db      4,5
        db      3,5
        db      2,5
        db      1,5
        db      0,5
        db      7,4
        db      6,4
        db      5,4
        db      4,4
        db      3,4
        db      2,4
        db      1,4
        db      0,4
        db      7,3
        db      6,3
        db      5,3
        db      4,3
        db      3,3
        db      2,3
        db      1,3
        db      0,3
        db      7,2
        db      6,2
        db      5,2
        db      4,2
        db      3,2
        db      2,2
        db      1,2
        db      0,2
        db      7,1
        db      6,1
        db      5,1
        db      4,1
        db      3,1
        db      2,1
        db      1,1
        db      0,1
        db      7,0
        db      6,0
        db      5,0
        db      4,0
        db      3,0
        db      2,0
        db      1,0
    db 255,255

tab_y:
    ; generated with following Python snippet:
    ;   > 'db ' + ','.join(map(lambda i:str(15-int(15*abs(math.sin(3.14*i/31)))), range(32)))
    db 15,14,12,11,10,8,7,6,5,4,3,2,1,1,1,1,1,1,1,1,2,3,4,5,6,7,8,10,11,12,14,15
    db 255

img:
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $E0, $20, $04, $07, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $C0, $20, $04, $03, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $80, $20, $04, $01, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $00, $60, $06, $00, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $00, $60, $06, $00, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FE, $00, $60, $06, $00, $7F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FE, $00, $60, $06, $00, $7F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FC, $00, $E0, $07, $00, $3F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F8, $00, $E0, $07, $00, $1F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F0, $01, $E0, $07, $80, $0F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $F0, $01, $E0, $07, $80, $0F, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $E0, $01, $E0, $07, $80, $07, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $C0, $03, $E0, $07, $C0, $03, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $80, $07, $E0, $07, $E0, $01, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $00, $07, $E0, $07, $E0, $00, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FC, $00, $0F, $E0, $07, $F0, $00, $3F, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $F8, $00, $1F, $E0, $07, $F8, $00, $1F, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $E0, $00, $1F, $E0, $07, $F8, $00, $07, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $00, $3F, $E0, $07, $FC, $00, $01, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FE, $00, $00, $7F, $E0, $07, $FE, $00, $00, $7F, $FF, $C0, $00
DB $00, $03, $FF, $F0, $00, $00, $FF, $E0, $07, $FF, $00, $00, $0F, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $01, $FF, $E0, $07, $FF, $80, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $03, $FF, $E0, $07, $FF, $C0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $07, $FF, $E0, $07, $FF, $E0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $0F, $FF, $E0, $07, $FF, $F0, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $3F, $FF, $E0, $07, $FF, $FC, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $00, $7F, $FF, $E0, $07, $FF, $FE, $00, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $01, $FF, $FF, $E0, $07, $FF, $FF, $80, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $07, $FF, $FF, $E0, $07, $FF, $FF, $E0, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $1F, $FF, $FF, $E0, $07, $FF, $FF, $F8, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $FF, $FF, $FF, $E0, $07, $FF, $FF, $FF, $07, $FF, $C0, $00
DB $00, $03, $FF, $E7, $FF, $FF, $FF, $E0, $07, $FF, $FF, $FF, $E7, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $F1, $F0, $00, $0F, $8F, $FF, $80, $FF, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $C0, $F0, $00, $0F, $07, $FF, $00, $3F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $C0, $70, $00, $0E, $03, $FE, $00, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $70, $00, $0E, $03, $FC, $00, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $70, $00, $0C, $01, $FC, $00, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $30, $00, $0C, $01, $FC, $00, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $80, $3F, $81, $FC, $01, $FC, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $3F, $81, $FC, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $1F, $81, $F8, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $00, $1F, $81, $F8, $00, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $1F, $81, $F8, $20, $FC, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $1F, $81, $F0, $20, $7C, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $04, $0F, $81, $F0, $20, $7C, $1C, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $FE, $0C, $0F, $81, $F0, $30, $7C, $18, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $0E, $0F, $81, $F0, $70, $3C, $10, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $0E, $07, $81, $E0, $70, $3C, $00, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $00, $07, $81, $E0, $00, $3C, $00, $7F, $07, $FF, $C0, $00
DB $00, $03, $FF, $FC, $00, $07, $81, $E0, $00, $1C, $10, $7F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $E0, $00, $1C, $10, $3F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $C0, $00, $1C, $18, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F8, $00, $03, $81, $C0, $00, $1C, $18, $1F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $83, $81, $C1, $FC, $0C, $1C, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $81, $81, $81, $FC, $0C, $1E, $0F, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $3F, $81, $81, $81, $FE, $0C, $1E, $07, $07, $FF, $C0, $00
DB $00, $03, $FF, $F0, $7F, $C1, $81, $81, $FE, $04, $1F, $03, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $7F, $C0, $81, $83, $FE, $04, $1F, $83, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $7F, $C0, $81, $03, $FF, $04, $1F, $81, $07, $FF, $C0, $00
DB $00, $03, $FF, $E0, $FF, $E0, $C3, $07, $FF, $06, $1F, $C1, $07, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $03, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $C0, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00

img_shift: db 0

    end 32768

ZX Freeq

  • *****
  • Wiadomości: 1754
  • Miejsce pobytu:
    Warszawa
Odp: CALL INCHL
« Odpowiedź #13 dnia: 2021.10.12, 23:24:17 »
Na 128k+3 jest już prawie ok, a Pentagon wyrabia się ze wszystkim. ;)
ZX80|ZX81+16kB+PandAY|ZX 48k/+/128k+/+2/+2A/+3/Vega/Next|QL+QIDE|JS128|Timex 2048+2040|UK2086|FDD3000+3.5''|AY|ZX HD|Divide2k11/2k14|DivMMC/PicoDivSD|BetaDisk 128|Opus|Masakrator FM|If 1/2/Microdrv|Multiface 1|+2A\B SDI-1|SJS 1/2|ZX Printer|TZXDuino|+3 HxC USB|ZXUno|Omni
Z88|A500/600|PC200|Ent128

matofesi

  • *****
  • Wiadomości: 1888
  • Miejsce pobytu:
    Toruń/Poland
Odp: CALL INCHL
« Odpowiedź #14 dnia: 2021.10.14, 13:52:53 »
Tak a'propos cytowanej procedurki przypomniało mi się, gdzie czegoś takiego używałem tutaj na forum:

https://www.speccy.pl/forum/index.php?topic=380.msg3932#msg3932

Procedura wyświetlania kursora sterowanego z klawiatury zasadniczo do wykorzystania w BASICowym kodzie - kursor jest rysowany w "nieokreślonym" miejscu i to jest właśnie miejsce dla inchl/next_hl :)