Setting call vector (hooking) from ROM

ページ 2/2
1 |

By Leo

Paragon (1236)

Leo さんの画像

12-12-2010, 20:21

well i think it is pre-allocated since there is one portion for each slot , the only problem comes when you have many extensions in the same slot, but it never happens ?
your ROM is in slot1 or 2 right ?

By Leo

Paragon (1236)

Leo さんの画像

12-12-2010, 20:40

you can see in the routine getwrk that each slot has a location different :

;--- Obtain slot work area (8 bytes) on SLTWRK
; Input: A = Slot number
; Output: HL = Work area address
; Modifies: AF, BC

GETWRK:
ld b,a
rrca
rrca
rrca
and %01100000
ld c,a ;C = Slot * 32
ld a,b
rlca
and %00011000 ;A = Subslot * 8
or c
ld c,a
ld b,0
ld hl,SLTWRK
add hl,bc
ret
each slot and subslot has 8 bytes reserved , so 4x4x8=128byte table

ページ 2/2
1 |