2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:48:35 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* **** START OF A2osX Global Page ****
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
A2osX.GP.B.start
|
|
|
|
|
.PH $BE00
|
|
|
|
|
*--------------------------------------
|
2015-11-10 20:52:11 +00:00
|
|
|
|
* A2osX.SYSCALL (AUXLC to AUXLC)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* In:
|
|
|
|
|
* X = SYSfnc.Index
|
|
|
|
|
* Y,A = free for Inline param
|
|
|
|
|
*--------------------------------------
|
2015-11-10 20:52:11 +00:00
|
|
|
|
A2osX.GP.Start jmp (KERNEL.SYSCALL,x)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-10 20:52:11 +00:00
|
|
|
|
* LIBCALL (AUXLC to AUXLC)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* In:
|
|
|
|
|
* Y = LIB.ID
|
|
|
|
|
* X = LIBfnc.Index
|
|
|
|
|
* A = free for Inline param
|
2015-11-10 20:52:11 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
jmp A2osX.LIBCALL1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Kernel.MLICALL (AUXLC to MAINLC)
|
|
|
|
|
* In:
|
|
|
|
|
* X = MLI Function
|
|
|
|
|
* A = Param Count
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
jmp A2osX.MLICALL1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
jmp A2osX.ROMCALL1
|
|
|
|
|
.BS $BE10-*
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
jmp (pDev) pDevJmp
|
|
|
|
|
jmp (pCode) pCodeJmp
|
|
|
|
|
jmp (pLib) pLibJmp
|
|
|
|
|
.BS $BE20-*
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-12-10 18:53:30 +00:00
|
|
|
|
GO.Reset jsr GO.AUXLC
|
|
|
|
|
jmp KERNEL.COLDBOOT
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
A2osX.LIBCALL1 pha
|
|
|
|
|
phx
|
|
|
|
|
tya
|
|
|
|
|
>SYSCALL SYS.GetMemPtrA
|
|
|
|
|
>STYA .1+1
|
|
|
|
|
plx
|
|
|
|
|
pla
|
|
|
|
|
.1 jmp $FFFF
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
A2osX.MLICALL1 jsr GO.MAINLC
|
|
|
|
|
stx .1
|
|
|
|
|
sta MLICALL.PARAMS
|
|
|
|
|
jsr MLI
|
|
|
|
|
.1 .BS 1
|
|
|
|
|
.DA MLICALL.PARAMS
|
2015-03-14 21:48:35 +00:00
|
|
|
|
jsr GO.AUXLC
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-11-22 22:30:06 +00:00
|
|
|
|
A2osX.ROMCALL1 plx
|
|
|
|
|
stx .1+1
|
|
|
|
|
plx
|
|
|
|
|
stx .1+2
|
|
|
|
|
ldx RROMBNK1
|
|
|
|
|
jsr .1
|
|
|
|
|
ldx RRAMWRAMBNK1
|
|
|
|
|
ldx RRAMWRAMBNK1
|
|
|
|
|
rts
|
|
|
|
|
.1 jmp $FFFF
|
2015-11-10 20:52:11 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
GO.MAINLC php
|
|
|
|
|
clc
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.HS 2C bit abs
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
GO.AUXLC php
|
|
|
|
|
sec
|
2015-12-10 18:53:30 +00:00
|
|
|
|
sei
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
sta A2osX.SaveA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
pla keep P in A for later
|
|
|
|
|
stx A2osX.SaveX
|
|
|
|
|
sty A2osX.SaveY
|
|
|
|
|
plx
|
|
|
|
|
ply
|
|
|
|
|
inx
|
|
|
|
|
bne .1
|
|
|
|
|
iny
|
|
|
|
|
.1 stx GO.EXIT.JMP+1
|
|
|
|
|
sty GO.EXIT.JMP+2
|
2015-11-22 22:30:06 +00:00
|
|
|
|
|
|
|
|
|
ldx RRAMWRAMBNK1
|
|
|
|
|
ldx RRAMWRAMBNK1
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldy pStack
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bcs GO.AUXLC1
|
|
|
|
|
|
|
|
|
|
GO.MAINLC1 tsx
|
|
|
|
|
stx A2osX.SaveSX
|
|
|
|
|
ldx A2osX.SaveSM
|
|
|
|
|
txs
|
2015-06-03 18:30:57 +00:00
|
|
|
|
stx CLRALTZP
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bra GO.EXIT
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
GO.AUXLC1 stx SETALTZP
|
|
|
|
|
tsx
|
2015-03-14 21:48:35 +00:00
|
|
|
|
stx A2osX.SaveSM
|
|
|
|
|
ldx A2osX.SaveSX
|
|
|
|
|
txs
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
GO.EXIT sty pStack
|
|
|
|
|
pha push P on stack
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ldy A2osX.SaveY
|
|
|
|
|
ldx A2osX.SaveX
|
|
|
|
|
lda A2osX.SaveA
|
|
|
|
|
plp
|
|
|
|
|
GO.EXIT.JMP jmp $FFFF
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
A2osX.SaveA .BS 1
|
|
|
|
|
A2osX.SaveX .BS 1
|
|
|
|
|
A2osX.SaveY .BS 1
|
2015-12-10 18:53:30 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IrqHandler
|
|
|
|
|
|
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
A2osX.GP.End .EQ *
|
2015-11-22 22:30:06 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* CONTROL SECTION :
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DO A2osX.GP.End>$BEBF
|
|
|
|
|
ERROR:GP too big
|
|
|
|
|
.FIN
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.BS A2osX.GP.START+$100-*
|
|
|
|
|
.EP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE A2OSX.S.GP
|
|
|
|
|
LOAD A2OSX.S
|
|
|
|
|
ASM
|