A2osX/ProDOS.FX/ProDOS.S.GP.txt

216 lines
5.9 KiB
Plaintext
Raw Normal View History

2019-10-16 06:09:13 +00:00
NEW
AUTO 3,1
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
GP.START .PH GP
GP.START1 jmp GP.MLIENTRY MLI Entry point
jmp * GP.DISPATCH : will be changed to point to dispatcher.
rts GP.CLOCK : changed to jmp ($4C) if clock present.
.DA CLK clock routine entry address.
jmp XDOS.SysErr GP.SYSERR : error reporting hook.
jmp XDOS.SysDeath GP.SYSDEATH : system failure hook.
.DA #0 GP.ERROR
.DA XDOS.NoDevice GP.DEVPTRS
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA XDOS.NoDevice
.DA #0 GP.DEVNUM
.DA #$ff GP.DEVCNT : count (-1) active devices
.HS 00000000000000 GP.DEVLST : up to 14 units may be active
2019-10-16 06:09:13 +00:00
.HS 00000000000000
.DA #0
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
.AS "(C)APPLE " 10 bytes, used for VEDRIVE/VSDRIVE
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
php GP.MLIENTRY
2019-10-16 06:09:13 +00:00
sei
2023-11-05 15:26:06 +00:00
bra GP.MLICONT
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
GP.TOOLBOX bit IO.RRAMWRAMBNK1
2023-11-05 15:26:06 +00:00
.DO AUXLC=1
sta IO.SETALTZP
.FIN
2023-11-04 14:42:28 +00:00
jmp XDOS.TBX
2019-10-19 18:35:30 +00:00
*--------------------------------------
.LIST ON
GP.FREE1 .EQ $BF58-*
.LIST OFF
.BS GP.FREE1
2023-11-04 14:42:28 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
* memory map of lower 48k. each bit represents 1 page.
* protected pages = 1, unprotected = 0
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
.HS C000000000000000 GP.MEMTABL
2019-10-16 06:09:13 +00:00
.HS 0000000000000000
.HS 0000000000000001
2019-10-19 18:35:30 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
* table of buffer addresses for currently open files.
* these can only be changed thru the mli call setbuf.
2019-10-19 18:35:30 +00:00
*--------------------------------------
.HS 0000 GP.BUFTABL
2023-11-04 14:42:28 +00:00
.HS 0000
.HS 0000
.HS 0000
.HS 0000
.HS 0000
.HS 0000
.HS 0000
2019-10-19 18:35:30 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
* table of interrupt vectors. these can only be changed
* by the mli call allocate_interrupt. values of the registers
* at the time of the most recent interrupt are stored here along
* with the address interrupted.
2019-10-19 18:35:30 +00:00
*--------------------------------------
GP.IRQVs .HS 0000 int #1
2019-10-16 06:09:13 +00:00
.HS 0000 int #2
.HS 0000 int #3
.HS 0000 int #4
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-05 15:26:06 +00:00
.DO AUXLC=1
GP.TBXEXIT sta IO.CLRALTZP
sta IO.RROMBNK2
rts
.FIN
.LIST ON
GP.FREE2 .EQ $BF90-*
.LIST OFF
.BS GP.FREE2
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
.HS 0000 GP.DATE
.HS 0000 GP.TIME
.DA #0 GP.FLEVEL : current file level
.DA #0 GP.BUBIT : backup bit disable, setfileinfo only
.DA #0 spare1: ProDOS 203 used to save acc
.DA #0 GP.NEWPFXPTR : appletalk alternate prefix ptr
.DA #0 GP.MACHID : machine ID byte
.DA #0 GP.SLTBYT : slot ROM bit map
.DA #0 GP.PFXPTR : prefix active flag
.DA #0 GP.MLIACTV : MLI active flag
.DO AUXLC=0
GP.MLIRTN .DA 0 MLI call return address
GP.MLIX .DA #0 MLI X register savearea
GP.MLIY .DA #0 MLI Y register savearea
.ELSE
GP.MLIEXITX2 pha MLI error
lda GP.BNKBYT1
.FIN
2019-10-19 18:35:30 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
* language card bank switching routines which must reside at $BFA0 because
* workstation software patches this area
2019-10-19 18:35:30 +00:00
*--------------------------------------
GP.MLIEXIT eor $E000 test for rom enable
2019-10-16 06:09:13 +00:00
beq .1 taken if ram enabled
2021-06-11 17:20:35 +00:00
2023-11-04 14:42:28 +00:00
sta IO.RROMBNK2 read ROM
2019-10-16 06:09:13 +00:00
bne .2 always
2021-06-11 17:20:35 +00:00
2023-11-04 14:42:28 +00:00
.1 lda GP.BNKBYT2 for alternate ram
2019-10-16 06:09:13 +00:00
eor $D000 test
beq .2 branch if not alternate ram
2021-06-11 17:20:35 +00:00
2023-11-04 14:42:28 +00:00
lda IO.RRAMWRAMBNK2 else enable alt $D000
2021-06-11 17:20:35 +00:00
2019-10-16 06:09:13 +00:00
.2 pla return code
2021-06-11 17:20:35 +00:00
2019-10-16 06:09:13 +00:00
rti re-enable interrupts and return
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
GP.MLICONT .DO AUXLC=0
sec
ror GP.MLIACTV notify interrupt routines MLI active.
2019-10-16 06:09:13 +00:00
lda $E000 preserve language card/rom orientation
2023-11-04 14:42:28 +00:00
sta GP.BNKBYT1 for proper restoration when mli exits.
2019-10-16 06:09:13 +00:00
lda $D000
2023-11-04 14:42:28 +00:00
sta GP.BNKBYT2
lda IO.RRAMWRAMBNK1 force ram card on
lda IO.RRAMWRAMBNK1 with write allowed
jmp XDOS.MAIN
.ELSE
2019-10-16 06:09:13 +00:00
2023-11-04 14:42:28 +00:00
sty GP.MLIEXIT.Y+1
2019-10-18 19:57:38 +00:00
2023-11-04 14:42:28 +00:00
pla A = Status register
2019-10-18 19:57:38 +00:00
2023-11-04 14:42:28 +00:00
ply
sty GP.MLIEXIT.PCL+1
ply
sty GP.MLIEXIT.PCH+1
2019-10-16 06:09:13 +00:00
2023-11-04 14:42:28 +00:00
ldy $E000
sty GP.BNKBYT1
ldy $D000 Y = BNKBYT2
2019-10-16 06:09:13 +00:00
2023-11-04 14:42:28 +00:00
sta IO.SETALTZP
bit IO.RRAMWRAMBNK1
jmp XDOS.AUX
*--------------------------------------
* A = Status register
* Y = MLI Error code
*--------------------------------------
GP.MLIEXITX sta IO.CLRALTZP
GP.MLIEXIT.PCH ldx #$FF SELF MODIFIED
phx
GP.MLIEXIT.PCL ldx #$FF SELF MODIFIED
phx
phy S reg for RTI
GP.MLIEXIT.X ldx #$FF SELF MODIFIED
GP.MLIEXIT.Y ldy #$FF SELF MODIFIED
bra GP.MLIEXITX2
2023-11-05 15:26:06 +00:00
GP.SELJMP sta IO.CLRALTZP
jmp $1000
2023-11-04 14:42:28 +00:00
.FIN
2019-10-19 18:35:30 +00:00
*--------------------------------------
.LIST ON
2023-11-05 15:26:06 +00:00
GP.FREE3 .EQ $BFEB-*
2019-10-19 18:35:30 +00:00
.LIST OFF
2023-11-05 15:26:06 +00:00
.BS GP.FREE3
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
GP.IRQV bit IO.RRAMWRAMBNK1 ***NEW ROM ONLY IRQ $fffe > $Cxxx space***
bit IO.RRAMWRAMBNK1 Entry used when rom/mainLC/auxLC
2021-06-11 17:20:35 +00:00
jmp IRQ
2019-10-19 18:35:30 +00:00
*--------------------------------------
2023-11-04 14:42:28 +00:00
GP.BNKBYT1 .DA #0
GP.BNKBYT2 .DA #0
2019-10-16 06:09:13 +00:00
.HS 00000000 pad to before $BFFA
.DA #4 gsos compatibility byte ($BFFA)
.DA #0 pad
.DA #0 reserved
.DA #0 version # of running interpreter
.DA #0 preserved for System Utilities
2023-11-04 14:42:28 +00:00
.DA #KVER GP.KVER : represents release 2.0.3
*--------------------------------------
.EP
2019-10-16 06:09:13 +00:00
*--------------------------------------
2019-11-01 20:06:04 +00:00
GP.LEN .EQ *-GP.START
2023-11-04 14:42:28 +00:00
*--------------------------------------
2019-10-16 06:09:13 +00:00
MAN
SAVE usr/src/prodos.fx/prodos.s.gp
2023-11-05 15:26:06 +00:00
LOAD usr/src/prodos.fx/prodos.s
2019-10-16 06:09:13 +00:00
ASM