summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
72ba373)
boot$stack: Used by boot and wboot (new)
bs$stack: Used by (char) bios functions that switch to bank 0, and now also for seldsk/read/write.
i$stack (formerly istack): Now global and used by *all* interrupt routines.
-SRC := bioskrnl.180 boot.180 stampf.180 chario.180 drvtbl.180
-SRC += move.180 time.180 mm.180 misc.180 utils.180 fifo.180
+SRC := bioskrnl.180 boot.180 chario.180
SRC += msgbuf.180 conbuf.180 ascii.180
SRC += msgbuf.180 conbuf.180 ascii.180
-SRC += sdio.180 cfio.180
+SRC += drvtbl.180 sdio.180 cfio.180 stampf.180
+SRC += move.180 time.180 fifo.180 utils.180 misc.180 mm.180
SRC += scb.180
ALLSRC := $(SRC) ldrbios.180
SRC += scb.180
ALLSRC := $(SRC) ldrbios.180
public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl\r
public ?mltio,?flush,?mov,?tim,?bnksl,?stbnk,?xmov\r
\r
public ?conos,?auxis,?auxos,?dvtbl,?devin,?drtbl\r
public ?mltio,?flush,?mov,?tim,?bnksl,?stbnk,?xmov\r
\r
+ extrn bs$stack\r
+ extrn _b0call\r
\r
\r
; BIOS Jump vector.\r
\r
\r
; BIOS Jump vector.\r
?ioctl jp ioctl ;\r
\r
\r
?ioctl jp ioctl ;\r
\r
\r
+ rept 48\r
+ db '|'\r
+ endm\r
+boot$stack:\r
+\r
+\r
; BOOT\r
; Initial entry point for system startup.\r
\r
; BOOT\r
; Initial entry point for system startup.\r
\r
out0 (cbr),a\r
ld a,USR$CBAR\r
out0 (cbar),a\r
out0 (cbr),a\r
ld a,USR$CBAR\r
out0 (cbar),a\r
\r
call hwinit ; first time hardware initialisation\r
\r
\r
call hwinit ; first time hardware initialisation\r
\r
; Entry for system restarts.\r
\r
wboot:\r
; Entry for system restarts.\r
\r
wboot:\r
call set$jumps ; initialize page zero\r
call ?rlccp ; reload CCP\r
jp ccp ; then reset jmp vectors and exit to ccp\r
call set$jumps ; initialize page zero\r
call ?rlccp ; reload CCP\r
jp ccp ; then reset jmp vectors and exit to ccp\r
- ds bs$stack$size\r
-bs$stack equ $\r
-\r
\r
; DEVTBL\r
; Return address of character device table\r
\r
; DEVTBL\r
; Return address of character device table\r
+ b0call _seldsk\r
+ ret\r
+\r
+_seldsk:\r
ld a,c ; save drive select code\r
ld (@adrv),a\r
xor a\r
ld a,c ; save drive select code\r
ld (@adrv),a\r
xor a\r
; extended disk parameter header (XDPH).\r
\r
read:\r
; extended disk parameter header (XDPH).\r
\r
read:\r
+ b0call _read\r
+ ret\r
+\r
+_read:\r
ld a,1\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
ld a,1\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
; extended disk parameter header (XDPH).\r
\r
write:\r
; extended disk parameter header (XDPH).\r
\r
write:\r
+ b0call _write\r
+ ret\r
+\r
+_write:\r
ld a,2\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
ld a,2\r
ld (@op),a\r
ld ix,(@xdph) ; get drive descriptor pointer\r
\r
@cbnk: db 0 ; bank for processor operations\r
\r
\r
@cbnk: db 0 ; bank for processor operations\r
\r
; Switch stack pointer to "system" stack in top ram\r
; Save cbar\r
;\r
; Switch stack pointer to "system" stack in top ram\r
; Save cbar\r
;\r
cseg ; common!\r
\r
public _b0call\r
cseg ; common!\r
\r
public _b0call\r
isv_sw: ;\r
ex (sp),hl ;save hl, 'return adr' in hl\r
\r
isv_sw: ;\r
ex (sp),hl ;save hl, 'return adr' in hl\r
\r
- ld (istack),sp ;save user stack pointer\r
- ld sp,istack\r
+ ld (i$stack),sp ;save user stack pointer\r
+ ld sp,i$stack\r
push de ;\r
push bc ;\r
push af ;\r
push de ;\r
push bc ;\r
push af ;\r
pop af ;\r
pop bc ;\r
pop de ;\r
pop af ;\r
pop bc ;\r
pop de ;\r
pop hl ;\r
ei ;\r
ret ;\r
\r
endif\r
pop hl ;\r
ei ;\r
ret ;\r
\r
endif\r
+\r
+ public i$stack\r
+ rept 24\r
+ db '|'\r
+ endm\r
+i$stack:\r
+ cseg\r
+ public bs$stack\r
+\r
+ rept bs$stack$size\r
+ db '|'\r
+ endm\r
+bs$stack:\r
+\r
;\r
; 1,25 ms clock tick\r
\r
;\r
; 1,25 ms clock tick\r
\r
\r
cseg ;common!\r
isvprt0: ;\r
\r
cseg ;common!\r
isvprt0: ;\r
+ ld (i$stack),sp ; + 19\r
+ ld sp,i$stack ; + 9\r
+\r
push af ; 11\r
in0 a,(tcr) ;reset TIF0 flag 12\r
in0 a,(tmdr0l) ; 12\r
in0 a,(tmdr0h) ; 12\r
;\r
push af ; 11\r
in0 a,(tcr) ;reset TIF0 flag 12\r
in0 a,(tmdr0l) ; 12\r
in0 a,(tmdr0h) ; 12\r
;\r
-\r
- push hl ;11\r
- ld hl,uptime ; 9\r
- inc (hl) ; 10 77\r
- jr nz,iprt_1 ; 6/8 -2\r
- inc hl ; 4\r
+ push hl ; 11\r
+ ld hl,time_to ; 9\r
+ ld a,(hl) ; 6\r
+ sub a,1 ; 6 79\r
+ jr c,iprt_0 ; 6/8\r
+ ld (hl),a ; 7\r
+iprt_0: ; 87 92\r
+ inc hl ; 4\r
+ inc (hl) ; 10 101\r
+ jr nz,iprt_1 ; 6/8 109 -2\r
+ inc hl ; 4\r
inc (hl) ; 10 14\r
jr nz,iprt_1 ; 6/8\r
inc (hl) ; 10 14\r
jr nz,iprt_1 ; 6/8\r
- inc hl ; 4\r
- inc (hl) ;10\r
- jr nz,iprt_1 ;6/8\r
- inc hl ; 4\r
- inc (hl) ;10\r
-iprt_1: ; 85 138\r
- pop hl ; 9\r
- ld a,(time_to) ; 12\r
- sub a,1 ; 6 112\r
- jr c,iprt_0 ; 6/8\r
- ld (time_to),a ; 13\r
-iprt_0: ; 120 178\r
+ inc hl ; 4\r
+ inc (hl) ; 10\r
+ jr nz,iprt_1 ; 6/8\r
+ inc hl ; 4\r
+ inc (hl) ; 10\r
+iprt_1: ; 109 138\r
+ pop hl ; 9\r
+ ld sp,(i$stack) ; + 18\r
- ret ; 9 141 199\r
- ; +intack 18 159 217\r
+ ret ; 9 139 199\r
+ ; +intack 18 157 217\r