A2osX/ProDOS.203/ProDOS.S.GP.txt

201 lines
5.5 KiB
Plaintext
Raw Normal View History

2019-04-29 20:36:58 +00:00
NEW
AUTO 3,1
* object code = mli_1
* global page
2019-09-13 06:37:52 +00:00
ofsG .EQ $2E00-MLI offset to global org
2019-09-13 15:39:37 +00:00
.BS $2E00-*
2019-09-10 15:46:56 +00:00
H2E00 jmp mlient1 $2E00-2EFF moved to $BF00
jspare .EQ *-ofsG
jmp jspare will be changed to point to dispatcher.
2019-09-10 20:53:18 +00:00
clockv .EQ *-ofsG P8 clock vector
2019-09-10 15:46:56 +00:00
rts changed to jmp ($4C) if clock present.
2019-09-10 20:53:18 +00:00
.DA tclk_in clock routine entry address.
p8errv .EQ *-ofsG error reporting hook.
2019-09-10 15:46:56 +00:00
jmp syserr1
sysdeath .EQ *-ofsG
2019-09-10 20:53:18 +00:00
jmp sysdeath1 system failure hook.
2019-09-10 15:46:56 +00:00
p8error .EQ *-ofsG P8 error code
2019-09-12 06:39:47 +00:00
.DA #0
2019-09-10 15:46:56 +00:00
drivertbl1 .EQ *-ofsG device driver table 1
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
drivertbl2 .EQ *-ofsG device driver table 2
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
.DA nodevice
2019-09-12 06:39:47 +00:00
*devnum .EQ *-ofsG most recent accessed device
2019-09-13 15:39:37 +00:00
.DA #0
2019-09-10 15:46:56 +00:00
numdevs .EQ *-ofsG count (-1) active devices
.DA #$ff
devlist .EQ *-ofsG active device list
.HS 00000000000000 up to 14 units may be active
.HS 00000000000000
2019-09-13 15:39:37 +00:00
.DA #0
2019-09-10 15:46:56 +00:00
.AS "(C)APPLE "
mlient1 .EQ *-ofsG
php
sei
jmp mlicont
aftirq .EQ *-ofsG irq returns here.
2019-09-12 06:39:47 +00:00
sta RRAMWRAMBNK1 read/write RAM bank 1
2019-09-10 20:53:18 +00:00
jmp fix45 restore $45 after interrupt in LC
2019-09-10 15:46:56 +00:00
oldacc .EQ *-ofsG
2019-09-13 15:39:37 +00:00
.DA #0
2019-09-10 15:46:56 +00:00
afbank .EQ *-ofsG
2019-09-11 15:53:33 +00:00
.HS 00
2019-04-29 20:36:58 +00:00
* memory map of lower 48k. each bit represents 1 page.
* protected pages = 1, unprotected = 0
2019-09-13 15:39:37 +00:00
memmap .EQ *-ofsG P8 memory bitmap
2019-09-10 15:46:56 +00:00
.HS C000000000000000
.HS 0000000000000000
2019-09-13 15:39:37 +00:00
.HS 0000000000000001
2019-04-29 20:36:58 +00:00
* table of buffer addresses for currently open files.
* these can only be changed thru the mli call setbuf.
2019-09-13 15:39:37 +00:00
buftbl .EQ *-ofsG
2019-09-10 15:46:56 +00:00
.HS 0000 file #1
2019-09-10 20:53:18 +00:00
.HS 0000 file #2
.HS 0000 file #3
.HS 0000 file #4
2019-09-13 15:39:37 +00:00
.HS 0000 file #5
2019-09-10 20:53:18 +00:00
.HS 0000 file #6
.HS 0000 file #7
.HS 0000 file #8
2019-04-29 20:36:58 +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-09-13 15:39:37 +00:00
inttbl .EQ *-ofsG interrupt table
.HS 0000 int #1
2019-09-10 20:53:18 +00:00
.HS 0000 int #2
.HS 0000 int #3
.HS 0000 int #4
2019-09-13 15:39:37 +00:00
p8areg .EQ *-ofsG A register savearea
.DA #0
p8xreg .EQ *-ofsG X register savearea
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-13 15:39:37 +00:00
p8yreg .EQ *-ofsG Y register savearea
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-13 15:39:37 +00:00
p8sreg .EQ *-ofsG S register savearea
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-13 15:39:37 +00:00
p8preg .EQ *-ofsG P register savearea
2019-09-10 15:46:56 +00:00
.DA #0
bankid .EQ *-ofsG bank ID byte (ROM/RAM)
.DA #1
2019-09-13 15:39:37 +00:00
intadr .EQ *-ofsG interrupt return address
2019-09-10 15:46:56 +00:00
.HS 0000
2019-09-13 15:39:37 +00:00
p8date .EQ *-ofsG bits 15-9=yr, 8-5=mo, 4-0=day
2019-09-10 15:46:56 +00:00
.HS 0000
2019-09-13 15:39:37 +00:00
p8time .EQ *-ofsG bits 12-8=hr, 5-0=min, low-hi format
2019-09-10 15:46:56 +00:00
.HS 0000
flevel .EQ *-ofsG current file level
.DA #0
2019-09-13 15:39:37 +00:00
bubit .EQ *-ofsG backup bit disable, setfileinfo only
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-10 20:53:18 +00:00
spare1 .EQ *-ofsG used to save acc
2019-09-10 15:46:56 +00:00
.DA #0
newpfxptr .EQ *-ofsG appletalk alternate prefix ptr
.DA #0
2019-09-12 06:39:47 +00:00
*machid .EQ *-ofsG machine ID byte
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-13 15:39:37 +00:00
rommap .EQ *-ofsG slot ROM bit map
2019-09-10 15:46:56 +00:00
.DA #0
preflag .EQ *-ofsG prefix active flag
.DA #0
2019-09-13 15:39:37 +00:00
mliact .EQ *-ofsG MLI active flag
2019-09-10 15:46:56 +00:00
.DA #0
mliretn .EQ *-ofsG last MLI call return address
.DA 0
2019-09-13 15:39:37 +00:00
mlix .EQ *-ofsG MLI X register savearea
2019-09-10 15:46:56 +00:00
.DA #0
2019-09-13 15:39:37 +00:00
mliy .EQ *-ofsG MLI Y register savearea
2019-09-10 15:46:56 +00:00
.DA #0
2019-04-29 20:36:58 +00:00
* language card bank switching routines which must reside at $BFA0 because
* workstation software patches this area
2019-09-10 15:46:56 +00:00
HBFA0 .EQ *-ofsG
2019-09-12 06:39:47 +00:00
GP.HBFA0 eor $E000 test for rom enable
2019-09-13 15:39:37 +00:00
beq .1 taken if ram enabled
2019-09-12 06:39:47 +00:00
sta RROMBNK2 read ROM
2019-09-13 15:39:37 +00:00
bne .2 always
.1 lda bnkbyt2 for alternate ram
eor $D000 test
beq .2 branch if not alternate ram
2019-09-12 06:39:47 +00:00
lda RRAMWRAMBNK2 else enable alt $D000
2019-09-13 15:39:37 +00:00
.2 pla return code
rti re-enable interrupts and return
2019-09-10 15:46:56 +00:00
mlicont .EQ *-ofsG
sec
2019-09-10 20:53:18 +00:00
ror mliact notify interrupt routines MLI active.
lda $E000 preserve language card/rom orientation
sta bnkbyt1 for proper restoration when mli exits.
2019-09-10 15:46:56 +00:00
lda $D000
sta bnkbyt2
2019-09-12 06:39:47 +00:00
lda RRAMWRAMBNK1 force ram card on
lda RRAMWRAMBNK1 with write allowed
2019-09-10 15:46:56 +00:00
jmp xdosmli
irqexit .EQ *-ofsG
2019-09-13 15:39:37 +00:00
lda bankid determine state of ram card (ROM/RAM)
2019-09-10 15:46:56 +00:00
irqxit0 .EQ *-ofsG
2019-09-13 15:39:37 +00:00
GP.irqxit0 beq .2 branch if ram card enabled.
bmi .1 branch if alternate $D000 enabled.
2019-09-10 15:46:56 +00:00
2019-09-13 15:39:37 +00:00
lsr determine if no ram card present.
2019-09-10 20:53:18 +00:00
bcc .3 branch if rom only system.
2019-09-10 15:46:56 +00:00
2019-09-12 06:39:47 +00:00
lda RROMWRAMBNK2 enable rom
2019-09-10 20:53:18 +00:00
bcs .3 always taken
2019-09-10 15:46:56 +00:00
2019-09-12 06:39:47 +00:00
.1 lda RRAMWRAMBNK2 enable alternate $D000
.2 lda #$01 preset bankid for rom.
2019-09-10 20:53:18 +00:00
sta bankid (reset if ram card interrupt)
.3 lda p8areg restore acc
rti exit
2019-09-10 15:46:56 +00:00
irqent .EQ *-ofsG this entry only used when rom
2019-09-12 06:39:47 +00:00
bit RRAMWRAMBNK1 was enabled at time of interrupt.
bit RRAMWRAMBNK1
2019-09-10 15:46:56 +00:00
jmp irqrecev
bnkbyt1 .EQ *-ofsG
.DA #0
bnkbyt2 .EQ *-ofsG
.DA #0
.HS 00000000 pad to before $BFFA
.DA #4 gsos compatibility byte ($BFFA)
2019-09-13 15:39:37 +00:00
.DA #0 pad
2019-09-10 15:46:56 +00:00
.DA #0 reserved
.DA #0 version # of running interpreter
.DA #0 preserved for System Utilities
kversion .EQ *-ofsG kernal version
.HS 23 represents release 2.0.3
2019-04-29 20:36:58 +00:00
* end of obj mli_1
*--------------------------------------
MAN
2019-07-08 12:56:54 +00:00
SAVE USR/SRC/PRODOS.203/PRODOS.S.GP
LOAD USR/SRC/PRODOS.203/PRODOS.S
2019-04-29 20:36:58 +00:00
ASM