A2osX/SYS/KERNEL.S.txt

128 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /A2OSX.SRC
LOMEM $A00
INC 1
AUTO 6
.LIST OFF
.OP 65C02
.OR $2000
.TF /A2OSX.BOOT/SYS/KERNEL
*--------------------------------------
.INB /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/INC/IO.I
.INB /A2OSX.DEV/INC/PRODOS.I
.INB /A2OSX.DEV/INC/MLI.ERR.I
*--------------------------------------
TmpPtr1 .EQ $0 for X.PRINTF.S
ZPPtr1 .EQ ZPKERNEL Temp Ptrs for use in very limited scope
ZPPtr2 .EQ ZPKERNEL+2 (could be trashed by any JSR)
ZPPtr3 .EQ ZPKERNEL+4
ZPPtr4 .EQ ZPKERNEL+6
sei
ldx #$FF init 6502 stack to highest
txs
sta SETALTZP
stx A2osX.SaveSM
stx A2osX.SaveSX
sta CLRALTZP Make sure MAIN ZP is enabled for X.PRINT.F
lda RROMBNK1 Make sure ROM is enabled for X.PRINT.F
cli
jsr Kernel.Init2
>DEBUGOA
jmp Kernel.Init3
.INB X.PRINTF.S
.INB SYS/KERNEL.S.INIT2
.INB SYS/KERNEL.S.INIT3
* Global Page
A2osX.GP .EQ *
.PH $BD00
.INB SYS/KERNEL.S.GP
.EP
A2osX.GP.SIZE .EQ *-A2osX.GP
* LC AUX $D000 BANK1 API Calls $00-$3E
A2osX.D001 .EQ *
.PH $D000
.DA #RRAMWRAMBNK1
.INB SYS/KERNEL.S.FIO
.INB SYS/KERNEL.S.DRV
.INB SYS/KERNEL.S.LIB
.INB SYS/KERNEL.S.TIME
.INB SYS/KERNEL.S.FILE
.INB SYS/KERNEL.S.DIR
.INB SYS/KERNEL.S.PFT
.INB SYS/KERNEL.S.BIN
.EP
A2osX.D001.SIZE .EQ *-A2osX.D001
* LC AUX $D000 BANK2 API Calls $40-$8E
A2osX.D002 .EQ *
.PH $D000
.DA #RRAMWRAMBNK2
.INB SYS/KERNEL.S.CIO
.INB SYS/KERNEL.S.STR
.INB SYS/KERNEL.S.DEV
.INB SYS/KERNEL.S.PS
.INB SYS/KERNEL.S.ARG
.INB SYS/KERNEL.S.ENV
.INB SYS/KERNEL.S.RUN
.INB SYS/KERNEL.S.EVT
.INB SYS/KERNEL.S.TSK
.EP
A2osX.D002.SIZE .EQ *-A2osX.D002
* LC AUX $E000 API Calls $80-$FE
A2osX.E000 .EQ *
.PH $E000
.INB SYS/KERNEL.S.JMP
.INB SYS/KERNEL.S.DAT
.INB SYS/KERNEL.S.IRQ
.INB SYS/KERNEL.S.MEM
.INB SYS/KERNEL.S.CNV
.INB SYS/KERNEL.S.CHR
* Make sure KERNEL.S.D01 is the last one
.INB SYS/KERNEL.S.D01
.EP
A2osX.E000.SIZE .EQ *-A2osX.E000
* CONTROL SECTION :
.LIST ON
Check.GP .EQ A2osX.GP.SIZE
Check.D001 .EQ A2osX.D001.SIZE
Check.D002 .EQ A2osX.D002.SIZE
Check.E000 .EQ A2osX.E000.SIZE
.LIST OFF
.DO A2osX.GP.SIZE>$1E0
.LIST ON
* !!!!!!!!! ERROR:GP too big !!!!!!!!!!
.LIST OFF
.FIN
.DO A2osX.D001.SIZE>$1000
.LIST ON
* !!!!!!!!! ERROR:BNK1 too big !!!!!!!!
.LIST OFF
.FIN
.DO A2osX.D002.SIZE>$1000
.LIST ON
* !!!!!!!!! ERROR:BNK2 too big !!!!!!!!
.LIST OFF
.FIN
MAN
SAVE SYS/KERNEL.S
ASM