More VT100 ROM code annotations
This commit is contained in:
parent
061ee67fe4
commit
5e931dd7b9
1 changed files with 45 additions and 32 deletions
|
|
@ -3744,48 +3744,60 @@ X1916: dad h ;;
|
||||||
;;
|
;;
|
||||||
;; Loads address A into NVR address register
|
;; Loads address A into NVR address register
|
||||||
;;
|
;;
|
||||||
X1928: lda X21ae ; Load accumulator from 0x21ae -- (0x42)
|
X1928: lda X21ae ;; Load accumulator from 0x21ae -- (0x42)
|
||||||
X192b: mvi b,0ffh ; B = 0xff
|
X192b: mvi b,0ffh ;; B = 0xff
|
||||||
X192d: inr b ; increment B
|
X192d: inr b ;; increment B
|
||||||
sui 0ah ; subtract 0x0a from accumulator
|
sui 0ah ;; subtract 0x0a from accumulator
|
||||||
jp X192d ; repeat while accumulator is positive
|
jp X192d ;; repeat while accumulator is positive
|
||||||
adi 0ah ; add 0x0a to accumulator
|
adi 0ah ;; add 0x0a to accumulator
|
||||||
;; B = A/10, A = A%10 -- this is almost certainly related to NVR!
|
|
||||||
;; First, fill the buffer at 21d3 with 20 bytes of 0x23 (accept address 1)
|
;; B = A/10, A = A%10 -- this is almost certainly related to NVR!
|
||||||
lxi h,X21d3 ; HL = 0x21d3
|
;; First, fill the buffer at 21d3 with 20 bytes of 0x23 (accept address 1)
|
||||||
mvi e,23h ; E = 0x23
|
|
||||||
mvi d,14h ; D = 0x14
|
lxi h,X21d3 ;; HL = 0x21d3
|
||||||
X193c: mov m,e ;
|
mvi e,23h ;; E = 0x23
|
||||||
inx h ; HL++
|
mvi d,14h ;; D = 0x14
|
||||||
dcr d ; D--
|
X193c: mov m,e ;;
|
||||||
jnz X193c ; repeat until D is zero
|
inx h ;; HL++
|
||||||
;; End buffer with 0x2f -- put in standby
|
dcr d ;; D--
|
||||||
mvi m,2fh ; Store 0x2f in 21e7
|
jnz X193c ;; repeat until D is zero
|
||||||
;; Set 21d3 + a to 0x22 (accept address 0)
|
|
||||||
lxi h,X21d3 ; HL = 0x21d3
|
;; End buffer with 0x2f -- put in standby
|
||||||
mov e,a ; copy A to E
|
|
||||||
mvi d,0 ; clear D
|
mvi m,2fh ;; Store 0x2f in 21e7
|
||||||
dad d ; add DE to HL -- calculate address of bit A
|
|
||||||
mvi m,22h ; Store 0x22 in M
|
;; Set 21d3 + a to 0x22 (accept address 0)
|
||||||
;; Set 21d3 + 10 + b to 0x22 (accept address 0)
|
|
||||||
lxi h,X21d3 ; HL = 0x21d3
|
lxi h,X21d3 ;; HL = 0x21d3
|
||||||
mvi a,0ah ; A = 0x0a
|
mov e,a ;; copy A to E
|
||||||
add b ; A = 0x0a + B
|
mvi d,0 ;; clear D
|
||||||
|
dad d ;; add DE to HL -- calculate address of bit A
|
||||||
|
mvi m,22h ;; Store 0x22 in M
|
||||||
|
|
||||||
|
;; Set 21d3 + 10 + b to 0x22 (accept address 0)
|
||||||
|
|
||||||
|
lxi h,X21d3 ;; HL = 0x21d3
|
||||||
|
mvi a,0ah ;; A = 0x0a
|
||||||
|
add b ;; A = 0x0a + B
|
||||||
mov e,a
|
mov e,a
|
||||||
dad d
|
dad d
|
||||||
mvi m,22h
|
mvi m,22h
|
||||||
|
|
||||||
;; Wait for horiz latch
|
;; Wait for horiz latch
|
||||||
|
|
||||||
X1957: in 42h
|
X1957: in 42h
|
||||||
ana c
|
ana c
|
||||||
jnz X1957
|
jnz X1957
|
||||||
|
|
||||||
;; Now copy from 21d3 to nvr latch, one per edge, 21 bytes
|
;; Now copy from 21d3 to nvr latch, one per edge, 21 bytes
|
||||||
|
|
||||||
lxi h,X21d3
|
lxi h,X21d3
|
||||||
mvi b,15h ;
|
mvi b,15h ;;
|
||||||
X1962: in 42h
|
X1962: in 42h
|
||||||
ana c ; Flags Buffer & C
|
ana c ;; Flags Buffer & C
|
||||||
jz X1962
|
jz X1962
|
||||||
dcr b
|
dcr b
|
||||||
rm ; Return if B is negative
|
rm ;; Return if B is negative
|
||||||
X196a: in 42h
|
X196a: in 42h
|
||||||
ana c
|
ana c
|
||||||
jnz X196a
|
jnz X196a
|
||||||
|
|
@ -4712,6 +4724,8 @@ X1fbd: in 1
|
||||||
X1fd4: ora a
|
X1fd4: ora a
|
||||||
mov a,c
|
mov a,c
|
||||||
ret
|
ret
|
||||||
|
;
|
||||||
|
; Last but not least, pad out to 8K (8192) bytes
|
||||||
;
|
;
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
|
|
@ -4936,7 +4950,6 @@ Xcd0b equ 0cd0bh
|
||||||
Xd0f2 equ 0d0f2h
|
Xd0f2 equ 0d0f2h
|
||||||
Xfe1a equ 0fe1ah
|
Xfe1a equ 0fe1ah
|
||||||
Xff01 equ 0ff01h
|
Xff01 equ 0ff01h
|
||||||
;
|
|
||||||
end
|
end
|
||||||
;
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue