2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2017-01-12 17:43:45 +00:00
|
|
|
|
LOMEM $A00
|
2015-03-14 21:48:35 +00:00
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.OR $2000
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.TF /A2OSX.BOOT/SYS/KERNEL
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-24 15:54:43 +00:00
|
|
|
|
.INB /A2OSX.DEV/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
|
|
|
|
.INB /A2OSX.DEV/INC/IO.I
|
|
|
|
|
.INB /A2OSX.DEV/INC/PRODOS.I
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-06-07 06:10:18 +00:00
|
|
|
|
TmpPtr1 .EQ $0 for X.PRINTF.S
|
2017-01-12 17:43:45 +00:00
|
|
|
|
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
|
2015-11-22 22:30:06 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-29 15:12:04 +00:00
|
|
|
|
* Kernel Init Stage 2
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-08-29 15:12:04 +00:00
|
|
|
|
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
|
|
|
|
|
|
2016-08-28 20:48:01 +00:00
|
|
|
|
jsr Kernel.Init2
|
2016-06-07 06:10:18 +00:00
|
|
|
|
>DEBUGOA
|
|
|
|
|
*--------------------------------------
|
2016-08-29 15:12:04 +00:00
|
|
|
|
* Kernel Init Stage 3
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-28 15:34:15 +00:00
|
|
|
|
sta SETALTZP
|
|
|
|
|
bit RRAMWRAMBNK1
|
|
|
|
|
bit RRAMWRAMBNK1
|
2016-09-29 06:26:54 +00:00
|
|
|
|
jmp Kernel.Init3
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.INB X.PRINTF.S
|
2016-08-28 20:48:01 +00:00
|
|
|
|
.INB SYS/KERNEL.S.INIT2
|
|
|
|
|
.INB SYS/KERNEL.S.INIT3
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-06-07 06:10:18 +00:00
|
|
|
|
* Global Page
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-25 16:20:28 +00:00
|
|
|
|
A2osX.GP .EQ *
|
|
|
|
|
.PH $BD00
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.INB SYS/KERNEL.S.GP
|
|
|
|
|
.EP
|
2016-11-25 16:20:28 +00:00
|
|
|
|
A2osX.GP.END .EQ *
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-27 15:51:59 +00:00
|
|
|
|
* LC AUX $D000 BANK1 API Calls $00-$3E
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
A2osX.D001 .EQ *
|
|
|
|
|
.PH $D000
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.DA #RRAMWRAMBNK1
|
2016-09-27 15:51:59 +00:00
|
|
|
|
.INB SYS/KERNEL.S.FIO
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.INB SYS/KERNEL.S.DRV
|
|
|
|
|
.INB SYS/KERNEL.S.LIB
|
2016-09-22 15:46:01 +00:00
|
|
|
|
.INB SYS/KERNEL.S.TIME
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.INB SYS/KERNEL.S.FILE
|
|
|
|
|
.INB SYS/KERNEL.S.DIR
|
2016-09-27 15:51:59 +00:00
|
|
|
|
*--------------------------------------
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.INB SYS/KERNEL.S.PFT
|
2016-09-27 15:51:59 +00:00
|
|
|
|
.INB SYS/KERNEL.S.BIN
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.EP
|
2016-10-07 15:28:17 +00:00
|
|
|
|
A2osX.D001.END .EQ *
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* 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
|
|
|
|
|
*--------------------------------------
|
2016-10-29 19:58:21 +00:00
|
|
|
|
.INB SYS/KERNEL.S.CNV
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.INB SYS/KERNEL.S.RUN
|
|
|
|
|
.INB SYS/KERNEL.S.EVT
|
|
|
|
|
.INB SYS/KERNEL.S.TSK
|
|
|
|
|
.EP
|
2016-06-07 06:10:18 +00:00
|
|
|
|
A2osX.D002.END .EQ *
|
|
|
|
|
*--------------------------------------
|
2016-09-27 15:51:59 +00:00
|
|
|
|
* LC AUX $E000 API Calls $80-$FE
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
A2osX.E000 .EQ *
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.PH $E000
|
2016-09-05 06:10:04 +00:00
|
|
|
|
.INB SYS/KERNEL.S.JMP
|
2016-10-04 16:01:07 +00:00
|
|
|
|
.INB SYS/KERNEL.S.DAT
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.INB SYS/KERNEL.S.IRQ
|
|
|
|
|
.INB SYS/KERNEL.S.MEM
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.INB SYS/KERNEL.S.CHR
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-21 15:03:41 +00:00
|
|
|
|
PullPtr1Ptr2Ptr3
|
|
|
|
|
sec
|
|
|
|
|
.HS 90 bcc
|
|
|
|
|
PullPtr1Ptr2 clc
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>PULLW ZPPtr1
|
|
|
|
|
>PULLW ZPPtr2
|
2016-10-21 15:03:41 +00:00
|
|
|
|
bcc .9
|
2017-01-12 17:43:45 +00:00
|
|
|
|
>PULLW ZPPtr3
|
2016-10-21 15:03:41 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2016-10-07 15:28:17 +00:00
|
|
|
|
* Make sure KERNEL.S.D01 is the last one
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-10-07 15:28:17 +00:00
|
|
|
|
.INB SYS/KERNEL.S.D01
|
2016-06-07 06:10:18 +00:00
|
|
|
|
.EP
|
|
|
|
|
A2osX.E000.END .EQ *
|
2016-09-26 16:00:52 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* CONTROL SECTION :
|
2016-06-07 06:10:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.LIST ON
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-11-25 16:20:28 +00:00
|
|
|
|
A2osX.GP.SIZE .EQ A2osX.GP.END-A2osX.GP
|
2016-06-07 06:10:18 +00:00
|
|
|
|
A2osX.D001.SIZE .EQ A2osX.D001.END-A2osX.D001
|
|
|
|
|
A2osX.D002.SIZE .EQ A2osX.D002.END-A2osX.D002
|
|
|
|
|
A2osX.E000.SIZE .EQ A2osX.E000.END-A2osX.E000
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.LIST OFF
|
2016-11-25 16:20:28 +00:00
|
|
|
|
.DO A2osX.GP.SIZE>$1E0
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.LIST ON
|
2017-01-12 17:43:45 +00:00
|
|
|
|
* !!!!!!!!! ERROR:GP too big !!!!!!!!!!
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.FIN
|
|
|
|
|
.DO A2osX.D001.SIZE>$1000
|
|
|
|
|
.LIST ON
|
2017-01-12 17:43:45 +00:00
|
|
|
|
* !!!!!!!!! ERROR:BNK1 too big !!!!!!!!
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.FIN
|
|
|
|
|
.DO A2osX.D002.SIZE>$1000
|
|
|
|
|
.LIST ON
|
2017-01-12 17:43:45 +00:00
|
|
|
|
* !!!!!!!!! ERROR:BNK2 too big !!!!!!!!
|
2016-09-26 16:00:52 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.FIN
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S
|
|
|
|
|
ASM
|