antoine-source/kikekankoi/markerror/z8100.txt
Antoine Vignau ee40ccd6d6 KKKK v0
2023-12-10 23:45:46 +01:00

418 lines
13 KiB
Plaintext

; EQU:
; Data addresses used by the opcodes that point to uninitialized memory areas.
DATA01: equ 7000h ; 28672. Data accessed by: 8193h(in SUB05)
DATA02: equ 7001h ; 28673. Data accessed by: 8198h(in SUB05)
SETPEN: equ BBDEh ; 48094. Subroutine. Called by: SUB05[8122h]. SET PEN
PLOT: equ BBEAh ; 48106. Subroutine. Called by: SUB05[8175h]. PLOT
LINEABS: equ BBF6h ; 48118. Subroutine. Called by: SUB05[8160h]. LINE ABSOLUTE
SETINK: equ BC32h ; 48178. Subroutine. Called by: SUB05[813Eh], SUB05[8147h]. SET INK
org 7FD0h; 7FD0h
; Data not accessed.
7FD0 BIN_START_7FD0:
7FD0 defb 00h ; 0
7FD1 defb 00h ; 0
7FD2 defb 00h ; 0
7FD3 defb 00h ; 0
7FD4 defb 00h ; 0
7FD5 defb 00h ; 0
7FD6 defb 00h ; 0
7FD7 defb 00h ; 0
7FD8 defb 00h ; 0
7FD9 defb 00h ; 0
7FDA defb 80h ; 128, -128 8380
7FDB defb 83h ; 131, -125
7FDC defb 10h ; 16 8C10
7FDD defb 8Ch ; 140, -116
7FDE defb 00h ; 0
; Data accessed by:
; 8100h(in SUB05)
7FDF DATA03:
7FDF defb 3Dh ; 61, '='
7FE0 defb 77h ; 119, 'w'
7FE1 defb BBh ; 187, -69
7FE2 defb DDh ; 221, -35
7FE3 defb EEh ; 238, -18
7FE4 defb 80h ; 128, -128
7FE5 defb 40h ; 64, '@'
7FE6 defb 20h ; 32, ' '
7FE7 defb 10h ; 16
7FE8 defb 08h ; 8
7FE9 defb 04h ; 4
7FEA defb 02h ; 2
7FEB defb 01h ; 1
; Data accessed by:
; 800Eh(in SUB02), 80E1h(in SUB04)
7FEC DATA04:
7FEC defb E4h ; 228, -28
7FED defb 7Fh ; 127
7FEE defb 00h ; 0
7FEF defb 00h ; 0
; Data accessed by:
; 80C2h(in SUB04)
7FF0 DATA05:
7FF0 defb 13h ; 19
; Data accessed by:
; 80CFh(in SUB04)
7FF1 DATA06:
7FF1 defb 03h ; 3
7FF2 defb 01h ; 1
7FF3 defb 01h ; 1
7FF4 defb 88h ; 136, -120
7FF5 defb 44h ; 68, 'D'
7FF6 defb 22h ; 34, '"'
7FF7 defb 11h ; 17
7FF8 defb 00h ; 0
7FF9 defb 00h ; 0
; Data accessed by:
; 8007h(in SUB02), 8045h(in SUB02), 8063h(in SUB02), 806Fh(in SUB02)
7FFA DATA07:
7FFA defb 02h ; 2
7FFB defb 70h ; 112, 'p'
7FFC defb 00h ; 0
7FFD defb 00h ; 0
; Data accessed by:
; 8181h(in SUB05), 800Bh(in SUB02), 8077h(in SUB02), 807Eh(in SUB02)
7FFE DATA08:
7FFE defb E4h ; 228, -28
; Data accessed by:
; 818Eh(in SUB05), 807Bh(in SUB02), 8082h(in SUB02)
7FFF DATA09:
7FFF defb E4h ; 228, -28
; Subroutine: Size=7, CC=1.
; Called by: SUB05[819Bh].
; Calls: SUB02.
8000 SUB01:
8000 di
8001 ld hl,7000h ; 28672
8004 ld de,7002h ; 28674
; Subroutine: Size=122, CC=9.
; Called by: SUB01[8004h].
; Calls: SUB03, SUB04.
8007 SUB02:
8007 ld (DATA07),de ; 7FFAh
800B ld a,(DATA08) ; 7FFEh
800E ld (DATA04),a ; 7FECh
8011 .sub02_loop:
8011 ld b,(hl)
8012 inc hl
8013 ld c,(hl)
8014 inc b
8015 call SUB04 ; 8088h
8018 cp 00h ; 0
801A jr nz,.sub02_l1 ; 801Fh
801C call SUB03 ; 805Bh
801F .sub02_l1:
801F dec b
8020 dec b
8021 call SUB04 ; 8088h
8024 cp 00h ; 0
8026 jr nz,.sub02_l2 ; 802Bh
8028 call SUB03 ; 805Bh
802B .sub02_l2:
802B inc b
802C inc c
802D call SUB04 ; 8088h
8030 cp 00h ; 0
8032 jr nz,.sub02_l3 ; 8037h
8034 call SUB03 ; 805Bh
8037 .sub02_l3:
8037 dec c
8038 dec c
8039 call SUB04 ; 8088h
803C cp 00h ; 0
803E jr nz,.sub02_l4 ; 8043h
8040 call SUB03 ; 805Bh
8043 .sub02_l4:
8043 inc hl
8044 ld a,h
8045 ld bc,(DATA07) ; 7FFAh
8049 cp b
804A jp nz,.sub02_loop ; 8011h
804D ld a,l
804E cp c
804F jp nz,.sub02_loop ; 8011h
8052 cp e
8053 jr nz,.sub02_l5 ; 8062h
8055 ld a,h
8056 cp d
8057 jr nz,.sub02_l5 ; 8062h
8059 ei
805A ret
; Subroutine: Size=7, CC=1.
; Called by: SUB02[801Ch], SUB02[8028h], SUB02[8034h], SUB02[8040h].
; Calls: -
805B SUB03:
805B ld a,b
805C ld (de),a
805D inc de
805E ld a,c
805F ld (de),a
8060 inc de
8061 ret
8062 .sub02_l5:
8062 ex de,hl
8063 ld de,(DATA07) ; 7FFAh
8067 and a
8068 sbc hl,de
806A push hl
806B pop bc
806C ld de,7000h ; 28672
806F ld hl,(DATA07) ; 7FFAh
8072 ldir
8074 ld hl,7000h ; 28672
8077 ld a,(DATA08) ; 7FFEh
807A push af
807B ld a,(DATA09) ; 7FFFh
807E ld (DATA08),a ; 7FFEh
8081 pop af
8082 ld (DATA09),a ; 7FFFh
8085 jp SUB02 ; 8007h
; Subroutine: Size=106, CC=2.
; Called by: SUB02[8015h], SUB02[8021h], SUB02[802Dh], SUB02[8039h].
; Calls: -
8088 SUB04:
8088 push hl
8089 push de
808A push bc
808B ld hl,7FF0h ; 32752
808E ld a,b
808F srl b
8091 srl b
8093 ld (hl),b
8094 and 03h ; 3
8096 inc hl
8097 ld (hl),a
8098 ld a,c
8099 and 07h ; 7
809B inc hl
809C ld b,a
809D ld (hl),a
809E inc hl
809F srl c
80A1 srl c
80A3 srl c
80A5 ld (hl),c
80A6 ld de,0800h ; 2048
80A9 ld hl,FFD0h ; 65488, -48
80AC inc b
80AD and a
80AE .sub04_loop1:
80AE sbc hl,de
80B0 djnz .sub04_loop1 ; 80AEh
80B2 add hl,de
80B3 push hl
80B4 ld de,0050h ; 80
80B7 ld hl,7FF3h ; 32755
80BA ld b,(hl)
80BB pop hl
80BC inc b
80BD and a
80BE .sub04_loop2:
80BE sbc hl,de
80C0 djnz .sub04_loop2 ; 80BEh
80C2 ld bc,(DATA05) ; 7FF0h
80C6 ld b,00h ; 0
80C8 add hl,bc
80C9 ld a,(hl)
80CA push hl
80CB push af
80CC ld hl,7FF4h ; 32756
80CF ld bc,(DATA06) ; 7FF1h
80D3 ld b,00h ; 0
80D5 add hl,bc
80D6 and (hl)
80D7 jp nz,.sub04_l ; 80EDh
80DA ld d,a
80DB pop af
80DC ld hl,7FE0h ; 32736
80DF add hl,bc
80E0 and (hl)
80E1 ld hl,(DATA04) ; 7FECh
80E4 add hl,bc
80E5 or (hl)
80E6 pop hl
80E7 ld (hl),a
80E8 ld a,d
80E9 .sub04_loop3:
80E9 pop bc
80EA pop de
80EB pop hl
80EC ret
80ED .sub04_l:
80ED pop bc
80EE pop bc
80EF jp .sub04_loop3 ; 80E9h
80F2 defb 00h ; 0
80F3 defb 00h ; 0
80F4 defb 00h ; 0
80F5 defb 00h ; 0
80F6 defb 00h ; 0
80F7 defb 00h ; 0
80F8 defb 00h ; 0
80F9 defb 00h ; 0
80FA defb 00h ; 0
80FB defb 00h ; 0
80FC defb 00h ; 0
80FD defb 00h ; 0
80FE defb 00h ; 0
80FF defb 00h ; 0
; Subroutine: Size=161, CC=5.
; Called by: -
; Calls: SUB01, SUB06, SETPEN, PLOT, LINEABS, SETINK.
8100 SUB05:
8100 ld a,(DATA03) ; 7FDFh
8103 add a,a
8104 add a,60h ; 96, '`'
8106 ld e,a
8107 ld d,7Fh ; 127
8109 ld a,(de)
810A ld l,a
810B inc de
810C ld a,(de)
810D ld h,a
810E .sub05_loop1:
810E ld a,(hl)
810F cp 00h ; 0
8111 ret z
8112 push hl
8113 push af
8114 and C0h ; 192, -64
8116 srl a
8118 srl a
811A srl a
811C srl a
811E srl a
8120 srl a
8122 call SETPEN ; BBDEh
8125 pop af
8126 push af
8127 and 30h ; 48, '0'
8129 pop de
812A ld a,d
812B jp nz,.sub05_l3 ; 817Bh jump if non-zero
812E srl a
8130 jp c,.sub05_l1 ; 8151h jump if bit 0 - A
8133 srl a
8135 jp c,.sub05_l2 ; 8166h jump is bit 1 - B
8138 inc hl
8139 ld b,(hl)
813A ld c,b
813B ld a,02h ; 2
813D push hl
813E call SETINK ; BC32h
8141 pop hl
8142 inc hl
8143 ld b,(hl)
8144 ld c,b
8145 ld a,03h ; 3
8147 call SETINK ; BC32h
814A .sub05_loop2:
814A pop hl
814B inc hl
814C inc hl
814D inc hl
814E jp .sub05_loop1 ; 810Eh
8151 .sub05_l1:
8151 inc hl
8152 push hl
8153 ld a,(hl)
8154 ld h,00h ; 0
8156 ld l,a
8157 add hl,hl
8158 ex de,hl
8159 pop hl
815A inc hl
815B ld a,(hl)
815C ld h,00h ; 0
815E ld l,a
815F add hl,hl
8160 call LINEABS ; BBF6h
8163 jp .sub05_loop2 ; 814Ah
8166 .sub05_l2:
8166 inc hl
8167 push hl
8168 ld a,(hl)
8169 ld h,00h ; 0
816B ld l,a
816C add hl,hl
816D ex de,hl
816E pop hl
816F inc hl
8170 ld a,(hl)
8171 ld h,00h ; 0
8173 ld l,a
8174 add hl,hl
8175 call PLOT ; BBEAh
8178 jp .sub05_loop2 ; 814Ah
817B .sub05_l3:
817B push af
817C and C0h ; 192, -64
817E call SUB06 ; 81A1h
8181 ld (DATA08),a ; 7FFEh
8184 pop af
8185 and 30h ; 48, '0'
8187 sla a
8189 sla a
818B call SUB06 ; 81A1h
818E ld (DATA09),a ; 7FFFh
8191 inc hl
8192 ld a,(hl)
8193 ld (DATA01),a ; 7000h
8196 inc hl
8197 ld a,(hl)
8198 ld (DATA02),a ; 7001h
819B call SUB01 ; 8000h
819E jp .sub05_loop2 ; 814Ah
; Subroutine: Size=19, CC=3.
; Called by: SUB05[817Eh], SUB05[818Bh].
; Calls: -
81A1 SUB06:
81A1 cp 40h ; 64, '@'
81A3 jp nz,.sub06_l1 ; 81A9h
81A6 ld a,E4h ; 228, -28
81A8 ret
81A9 .sub06_l1:
81A9 cp 80h ; 128, -128
81AB jp nz,.sub06_l2 ; 81B1h
81AE ld a,E8h ; 232, -24
81B0 ret
81B1 .sub06_l2:
81B1 ld a,F4h ; 244, -12
81B3 ret
; ...
; ...
; ...