2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2017-10-18 15:32:56 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-10 15:33:13 +00:00
|
|
|
|
Kernel.Init2 sei
|
2017-08-22 06:38:16 +00:00
|
|
|
|
ldx #$FF
|
|
|
|
|
txs
|
|
|
|
|
sta SETALTZP
|
|
|
|
|
|
|
|
|
|
stx A2osX.SaveSM
|
|
|
|
|
stx A2osX.SaveSX
|
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
ldx #Kernel.ZP.S-1
|
|
|
|
|
|
|
|
|
|
.1 lda Kernel.ZP,x
|
|
|
|
|
sta CHARGET,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
sta CLRALTZP
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI MSG.Init2
|
|
|
|
|
jsr PrintFYA
|
|
|
|
|
|
2017-12-22 21:24:30 +00:00
|
|
|
|
>LDYAI A2osX.MAIN
|
2017-11-22 16:27:50 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
>LDYAI CORE.Run
|
|
|
|
|
>STYA ZPPtr2
|
2017-12-22 21:24:30 +00:00
|
|
|
|
>LDYAI A2osX.MAIN.S^$FFFF
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-11-22 16:27:50 +00:00
|
|
|
|
jsr Kernel.Move
|
|
|
|
|
|
2017-12-22 21:24:30 +00:00
|
|
|
|
>LDYAI A2osX.AUX
|
|
|
|
|
>STYA A1L Src Start Address (MAIN)
|
|
|
|
|
>LDYAI A2osX.GP
|
|
|
|
|
>STYA A2L Src End Address (MAIN)
|
|
|
|
|
>LDYAI X.GUIOSD
|
|
|
|
|
>STYA A4L Dst Address (AUX)
|
|
|
|
|
sec Main To Aux
|
|
|
|
|
jsr AuxMove
|
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>LDYAI A2osX.GP
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
>LDYAI A2osX.SYSCALL
|
|
|
|
|
>STYA ZPPtr2
|
2017-11-22 16:27:50 +00:00
|
|
|
|
>LDYAI A2osX.GP.S^$FFFF
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr Kernel.Move
|
|
|
|
|
|
|
|
|
|
sta SETALTZP
|
2017-08-28 15:35:10 +00:00
|
|
|
|
bit RRAMWRAMBNK2
|
|
|
|
|
bit RRAMWRAMBNK2
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI A2osX.D2
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
>LDYAI $D000
|
|
|
|
|
>STYA ZPPtr2
|
2017-11-22 16:27:50 +00:00
|
|
|
|
>LDYAI A2osX.D2.S^$FFFF
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr Kernel.Move
|
|
|
|
|
|
2017-08-28 15:35:10 +00:00
|
|
|
|
bit RRAMWRAMBNK1
|
|
|
|
|
bit RRAMWRAMBNK1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI A2osX.D1
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
>LDYAI $D000
|
|
|
|
|
>STYA ZPPtr2
|
2017-11-22 16:27:50 +00:00
|
|
|
|
>LDYAI A2osX.D1.S^$FFFF
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr Kernel.Move
|
|
|
|
|
|
|
|
|
|
>LDYAI A2osX.E0
|
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
>LDYAI $E000
|
|
|
|
|
>STYA ZPPtr2
|
2017-11-22 16:27:50 +00:00
|
|
|
|
>LDYAI A2osX.E0.S^$FFFF
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr Kernel.Move
|
|
|
|
|
|
2018-07-12 15:20:39 +00:00
|
|
|
|
bit RROMBNK1
|
|
|
|
|
sta CLRALTZP
|
2017-08-22 06:38:16 +00:00
|
|
|
|
cli
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr KConfigLoad
|
|
|
|
|
|
|
|
|
|
lda A2osX.HZ
|
2018-07-12 15:20:39 +00:00
|
|
|
|
pha
|
|
|
|
|
>LDYAI MSG.HZ
|
|
|
|
|
jsr PrintFYA
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI MSG.Init2.OK
|
|
|
|
|
jsr PrintFYA
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
>DEBUGOA
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Kernel.Init3 sta SETALTZP
|
|
|
|
|
bit RRAMWRAMBNK1
|
|
|
|
|
bit RRAMWRAMBNK1
|
2017-10-16 15:41:48 +00:00
|
|
|
|
|
2018-04-13 15:18:48 +00:00
|
|
|
|
lda #$ff Make sure we are in Kernel Mode during setup
|
|
|
|
|
sta IRQ.InKernel
|
|
|
|
|
|
2018-12-14 07:32:20 +00:00
|
|
|
|
sta CLRMIXED
|
|
|
|
|
sta CLRHIRES
|
|
|
|
|
sta SET80STORE
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
sta SETALTCHAR
|
|
|
|
|
|
2019-01-06 09:58:49 +00:00
|
|
|
|
lda #"M"
|
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr MemMgrInit
|
2018-12-10 16:45:37 +00:00
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
>LDYAI S.PS Select Process 0 (Kernel)
|
|
|
|
|
jsr K.GetMem0
|
2018-12-18 14:37:07 +00:00
|
|
|
|
>STYA pPs
|
2019-01-24 13:53:29 +00:00
|
|
|
|
stx PS.Table.hPS
|
2018-12-18 14:37:07 +00:00
|
|
|
|
|
2019-01-24 13:53:29 +00:00
|
|
|
|
lda #1
|
|
|
|
|
sta CORE.PSCount
|
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
>LDYAI K.STACKTOP
|
|
|
|
|
>STYA pStack
|
2019-02-24 22:11:52 +00:00
|
|
|
|
sta pLocal+1
|
2018-12-18 14:37:07 +00:00
|
|
|
|
|
2019-01-06 09:58:49 +00:00
|
|
|
|
lda #"N"
|
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
>PUSHWI FD.NULL.NAME
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI FD.NULL
|
2018-07-17 15:45:59 +00:00
|
|
|
|
>SYSCALL MKDev
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2018-12-10 16:45:37 +00:00
|
|
|
|
jsr SysScrInit
|
2018-12-13 16:39:24 +00:00
|
|
|
|
bcs *
|
2019-01-07 15:48:25 +00:00
|
|
|
|
|
|
|
|
|
lda #"P"
|
2019-01-06 09:58:49 +00:00
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
>PUSHWI 0 Aux type
|
|
|
|
|
>PUSHBI S.FI.T.TXT
|
|
|
|
|
>PUSHBI O.RDWR
|
|
|
|
|
>LDYAI DEV.CONSOLE
|
|
|
|
|
>SYSCALL fopen
|
2018-12-03 13:56:52 +00:00
|
|
|
|
bcs *
|
2019-01-13 13:10:14 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.PS.hStdIn
|
|
|
|
|
sta (pPs),y
|
|
|
|
|
iny #S.PS.hStdOut
|
|
|
|
|
sta (pPs),y
|
|
|
|
|
iny #S.PS.hStdErr
|
|
|
|
|
sta (pPs),y
|
2019-01-06 09:58:49 +00:00
|
|
|
|
|
2019-01-07 15:48:25 +00:00
|
|
|
|
lda #"I"
|
2019-01-06 09:58:49 +00:00
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
*--------------------------------------
|
2019-01-13 13:10:14 +00:00
|
|
|
|
Kernel.Init3C >LDYAI MSG.Init3
|
2018-10-15 06:25:40 +00:00
|
|
|
|
>SYSCALL puts
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2018-07-13 14:38:24 +00:00
|
|
|
|
jsr CPU.Init.6502
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2018-07-13 14:38:24 +00:00
|
|
|
|
jsr CPU.Init.Z80
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr DevMgrInit
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr IrqMgrInit
|
|
|
|
|
bcs *
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr EvtMgrInit
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr TskMgrInit
|
|
|
|
|
bcs *
|
2018-12-03 13:56:52 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
ldy #S.PS.hPREFIX
|
|
|
|
|
lda (pPs),y
|
2018-10-04 15:30:14 +00:00
|
|
|
|
jsr K.GetMemPtr
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
>PUSHYA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
|
|
|
|
|
>PUSHBI 2
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>LDYAI MSG.Prefix
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2019-02-01 16:32:29 +00:00
|
|
|
|
lda KBD
|
|
|
|
|
bpl .7
|
|
|
|
|
sta KBDSTROBE
|
|
|
|
|
cmp #146 CTRL-R for ROOT mode
|
|
|
|
|
bne .7
|
2018-07-17 15:45:59 +00:00
|
|
|
|
|
2018-10-17 15:31:29 +00:00
|
|
|
|
>PUSHBI 0
|
2018-12-15 20:34:55 +00:00
|
|
|
|
>LDYAI MSG.CTRLR
|
2018-10-17 15:31:29 +00:00
|
|
|
|
>SYSCALL printf
|
2018-10-15 06:25:40 +00:00
|
|
|
|
|
2018-10-25 15:31:41 +00:00
|
|
|
|
>PUSHBI 0 PS Flags
|
2018-12-14 16:19:05 +00:00
|
|
|
|
>LDYAI CTRLR.SHELL
|
2018-07-17 15:45:59 +00:00
|
|
|
|
bra .8
|
|
|
|
|
|
2019-01-07 15:48:25 +00:00
|
|
|
|
.7 >PUSHWI ETCINIT.CMDLINE
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2018-11-16 22:43:12 +00:00
|
|
|
|
>LDYAI MSG.EtcInit
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>SYSCALL printf
|
2018-07-17 15:45:59 +00:00
|
|
|
|
|
2018-10-25 15:31:41 +00:00
|
|
|
|
>PUSHBI 0 PS Flags
|
2018-11-16 22:43:12 +00:00
|
|
|
|
>LDYAI ETCINIT.CMDLINE
|
2018-07-17 15:45:59 +00:00
|
|
|
|
|
2018-10-25 15:31:41 +00:00
|
|
|
|
.8 >SYSCALL ExecL
|
2018-11-30 07:42:49 +00:00
|
|
|
|
|
2018-12-03 06:59:30 +00:00
|
|
|
|
bcs Kernel.Init3.Err
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-10-25 15:31:41 +00:00
|
|
|
|
>PUSHBI 0
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>LDYAI MSG.Init3.OK
|
2018-10-05 14:58:38 +00:00
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
>DEBUGOA
|
|
|
|
|
|
2017-08-29 15:19:09 +00:00
|
|
|
|
jmp CORE.Run
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-12-03 06:59:30 +00:00
|
|
|
|
Kernel.Init3.Err
|
|
|
|
|
>PUSHA
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>LDYAI MSG.StartupErr
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bra * No need to discard Expanded CMDLINE
|
|
|
|
|
*--------------------------------------
|
2018-07-12 15:20:39 +00:00
|
|
|
|
* INIT2 Subs
|
|
|
|
|
*--------------------------------------
|
2018-07-10 15:33:13 +00:00
|
|
|
|
Kernel.Move >STYA ZPPtr3
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.1 inc ZPPtr3
|
|
|
|
|
bne .2
|
|
|
|
|
inc ZPPtr3+1
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
sta (ZPPtr2),y
|
|
|
|
|
iny
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
inc ZPPtr2+1
|
|
|
|
|
bne .1
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-07-12 15:20:39 +00:00
|
|
|
|
KConfigLoad >LDYAI MSG.KCREAD
|
|
|
|
|
jsr PrintFYA
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
|
|
|
|
jsr MLI
|
|
|
|
|
.DA #MLIOPEN
|
|
|
|
|
.DA MLIOPEN00
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
lda MLIOPEN00+5
|
|
|
|
|
sta MLIREAD00+1
|
|
|
|
|
sta MLICLOSE00+1
|
|
|
|
|
|
|
|
|
|
jsr MLI
|
|
|
|
|
.DA #MLIREAD
|
|
|
|
|
.DA MLIREAD00
|
|
|
|
|
php
|
|
|
|
|
pha
|
|
|
|
|
jsr MLI
|
|
|
|
|
.DA #MLICLOSE
|
|
|
|
|
.DA MLICLOSE00
|
|
|
|
|
pla
|
|
|
|
|
plp
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI MSG.KCREAD.OK
|
|
|
|
|
jsr PrintFYA
|
2018-07-10 15:33:13 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2018-07-12 15:20:39 +00:00
|
|
|
|
.9 >LDYAI MSG.KCREAD.KO
|
|
|
|
|
jsr PrintFYA
|
2018-07-10 15:33:13 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-07-12 15:20:39 +00:00
|
|
|
|
* INIT3 Subs
|
|
|
|
|
*--------------------------------------
|
2018-12-10 16:45:37 +00:00
|
|
|
|
MemMgrInit >LDYAI Mem.MHiMem
|
|
|
|
|
>STYA Mem.HiMem
|
|
|
|
|
>STYA Mem.Free
|
|
|
|
|
>LDYAI Mem.MLoMem
|
|
|
|
|
>STYA Mem.LoMem
|
|
|
|
|
stz Mem.LastSlot Reserve Slot #0
|
|
|
|
|
|
|
|
|
|
sta SETWRITEAUX
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2018-12-10 16:45:37 +00:00
|
|
|
|
>LDYAI Mem.XLoMem
|
|
|
|
|
>STYA Mem.LoMem
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2018-12-10 16:45:37 +00:00
|
|
|
|
stz Mem.LastSlot Reserve Slot #0
|
|
|
|
|
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
|
|
|
|
ldx #K.DEV.MAX*2-1
|
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
.1 stz Dev.Table,x
|
2018-12-10 16:45:37 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2018-12-21 14:32:45 +00:00
|
|
|
|
ldx #K.FLT.MAX*2-1
|
|
|
|
|
|
|
|
|
|
.11 stz Flt.Table.hPath,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .11
|
|
|
|
|
|
2018-12-10 16:45:37 +00:00
|
|
|
|
ldx #K.NOD.MAX*2-1
|
|
|
|
|
|
|
|
|
|
.2 stz Nod.Table.hPath,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
ldx #K.PS.MAX*4-1
|
|
|
|
|
|
|
|
|
|
.3 stz PS.Table.PID,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .3
|
|
|
|
|
|
|
|
|
|
ldx #K.OF.MAX*2-1
|
|
|
|
|
|
|
|
|
|
.4 stz OF.Table.hPath,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .4
|
|
|
|
|
|
|
|
|
|
ldx #K.EVT.MAX*S.EVT-1
|
|
|
|
|
|
|
|
|
|
.5 stz Evt.Table,x
|
|
|
|
|
dex
|
|
|
|
|
bpl .5
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-01-07 15:48:25 +00:00
|
|
|
|
SysScrInit lda #"S"
|
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
|
|
|
|
|
>LDYAI Mem.XHiMem
|
2018-12-17 14:24:39 +00:00
|
|
|
|
>STYA FD.TTY+S.FD.DEV.BUFPTR
|
|
|
|
|
|
|
|
|
|
jsr SysScrInit.TTYPtrs
|
2018-12-10 16:45:37 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
>PUSHWI FD.CONSOLE.NAME
|
|
|
|
|
>LDYAI FD.TTY
|
|
|
|
|
>SYSCALL MKDev
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2019-01-07 15:48:25 +00:00
|
|
|
|
lda #"0"
|
|
|
|
|
sta SYS.BASL0+38
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
ldx A2osX.TTYDEVS
|
2018-12-10 16:45:37 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.1 phx
|
2019-01-07 15:48:25 +00:00
|
|
|
|
inc SYS.BASL0+38
|
2018-12-10 16:45:37 +00:00
|
|
|
|
inc FD.TTY+S.FD.DEV.DEVID
|
2018-12-11 16:41:25 +00:00
|
|
|
|
inc FD.TTY.NAME+3
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
jsr SysScrInit.TTYPtrs
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
>PUSHWI FD.TTY.NAME
|
2018-12-10 16:45:37 +00:00
|
|
|
|
>LDYAI FD.TTY
|
|
|
|
|
>SYSCALL MKDev
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
plx
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
dex
|
2018-12-10 16:45:37 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
>LDYA FD.TTY+S.FD.DEV.BUFPTR
|
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
>STYA Mem.HiMem
|
|
|
|
|
>STYA Mem.Free
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
2018-07-12 15:20:39 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
SysScrInit.TTYPtrs
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda DevMgr.Free
|
|
|
|
|
sta FD.TTY+S.FD.DEV.DCBPTR
|
2019-01-07 15:48:25 +00:00
|
|
|
|
sta .1+1
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
clc
|
2018-12-13 16:39:24 +00:00
|
|
|
|
adc #S.DCB.TTY
|
|
|
|
|
sta DevMgr.Free
|
|
|
|
|
|
|
|
|
|
lda DevMgr.Free+1
|
|
|
|
|
sta FD.TTY+S.FD.DEV.DCBPTR+1
|
2019-01-07 15:48:25 +00:00
|
|
|
|
sta .1+2
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
adc /S.DCB.TTY
|
|
|
|
|
sta DevMgr.Free+1
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2019-01-07 15:48:25 +00:00
|
|
|
|
ldx #S.DCB.TTY-1
|
|
|
|
|
|
|
|
|
|
.1 stz $ffff,x SELF MODIFIED
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
lda FD.TTY+S.FD.DEV.BUFPTR
|
|
|
|
|
sec
|
|
|
|
|
sbc #TTY.BUF.SIZE
|
|
|
|
|
sta FD.TTY+S.FD.DEV.BUFPTR
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
lda FD.TTY+S.FD.DEV.BUFPTR+1
|
|
|
|
|
sbc /TTY.BUF.SIZE
|
|
|
|
|
sta FD.TTY+S.FD.DEV.BUFPTR+1
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-10-02 15:52:30 +00:00
|
|
|
|
CPU.Init.6502 >PUSHBI 0
|
|
|
|
|
>LDYAI MSG.CPU
|
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
jsr Detect6502 A = CPU type
|
|
|
|
|
sta A2osX.CPUTYPE
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
2018-07-13 14:38:24 +00:00
|
|
|
|
and #$F
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
ldy MSG.CPUTYPE,x
|
|
|
|
|
lda MSG.CPUTYPE+1,x
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
lda MACHID
|
2017-10-27 14:56:46 +00:00
|
|
|
|
and #MACHID.T
|
|
|
|
|
cmp #MACHID.T.IIc
|
2018-10-02 15:52:30 +00:00
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
jmp CPU.Init.Z80
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-10-02 15:52:30 +00:00
|
|
|
|
.10 >PUSHBI 0
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI MSG.CPU.SPEED
|
2018-10-02 15:52:30 +00:00
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
stz A2osX.RANDOM16
|
|
|
|
|
stz A2osX.RANDOM16+1
|
|
|
|
|
|
|
|
|
|
php
|
|
|
|
|
sei
|
|
|
|
|
|
|
|
|
|
.1 bit VBL
|
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
.2 bit VBL
|
|
|
|
|
bmi .2
|
|
|
|
|
|
|
|
|
|
ldx #0 Count LO
|
|
|
|
|
lda #0 Count HI
|
|
|
|
|
|
|
|
|
|
.3 ldy #3 (2)
|
|
|
|
|
|
|
|
|
|
.4 nop (2)
|
|
|
|
|
dey (2)
|
|
|
|
|
bne .4 (2*)
|
|
|
|
|
|
|
|
|
|
inc A2osX.RANDOM16 (6)
|
|
|
|
|
bne .5 (2*)
|
|
|
|
|
|
|
|
|
|
inc A2osX.RANDOM16+1 (6)
|
|
|
|
|
bit VBL (4)
|
|
|
|
|
bpl .3 (2*)
|
|
|
|
|
bmi .6
|
|
|
|
|
|
|
|
|
|
.5 nop (2)
|
|
|
|
|
nop (2)
|
|
|
|
|
nop (2)
|
|
|
|
|
bit VBL (4)
|
|
|
|
|
bpl .3 (2*)
|
|
|
|
|
|
|
|
|
|
.6 plp
|
|
|
|
|
|
|
|
|
|
stz A2osX.CPUSPEED
|
|
|
|
|
|
|
|
|
|
.7 sec
|
|
|
|
|
lda A2osX.RANDOM16
|
|
|
|
|
sbc #100
|
|
|
|
|
tax
|
|
|
|
|
lda A2osX.RANDOM16+1
|
|
|
|
|
sbc /100
|
|
|
|
|
bcc .8
|
|
|
|
|
|
|
|
|
|
stx A2osX.RANDOM16
|
|
|
|
|
sta A2osX.RANDOM16+1
|
|
|
|
|
inc A2osX.CPUSPEED
|
|
|
|
|
bra .7
|
|
|
|
|
|
|
|
|
|
.8 lda A2osX.RANDOM16
|
|
|
|
|
sta A2osX.CPUSPEED+1
|
2018-07-13 14:38:24 +00:00
|
|
|
|
>PUSHA push CPU speed LO
|
2017-08-22 06:38:16 +00:00
|
|
|
|
lda A2osX.CPUSPEED
|
2018-07-13 14:38:24 +00:00
|
|
|
|
>PUSHA push CPU speed HI
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI MSG.CPU.SPEEDOK
|
|
|
|
|
>SYSCALL printf
|
2018-07-13 14:38:24 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-10-02 15:52:30 +00:00
|
|
|
|
CPU.Init.Z80 >PUSHBI 0
|
|
|
|
|
>LDYAI MSG.Z80
|
|
|
|
|
>SYSCALL printf
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
jsr DetectZ80
|
|
|
|
|
bcs .9
|
|
|
|
|
sta A2osX.Z80SLOT
|
2018-07-13 14:38:24 +00:00
|
|
|
|
>PUSHA
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
tax
|
2017-10-19 15:27:38 +00:00
|
|
|
|
lda #A2osX.S.Z80
|
|
|
|
|
sta A2osX.S,x
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 1
|
2018-07-12 15:20:39 +00:00
|
|
|
|
>LDYAI MSG.Z80.OK
|
|
|
|
|
>SYSCALL printf
|
2017-08-22 06:38:16 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2018-07-12 15:20:39 +00:00
|
|
|
|
.9 >LDYAI MSG.Z80.KO
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-08-22 06:38:16 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Out:
|
|
|
|
|
* A = $60, 6502
|
|
|
|
|
* A = $61, 65C02
|
|
|
|
|
* A = $62, 65R02
|
|
|
|
|
* A = $63, 65816
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Detect6502 ldy #0 Test 6502 BCD bug
|
|
|
|
|
sed
|
|
|
|
|
lda #$99
|
|
|
|
|
clc
|
|
|
|
|
adc #$01
|
|
|
|
|
cld
|
|
|
|
|
bmi .9 BUG!, we have 6502
|
|
|
|
|
|
|
|
|
|
ldy #3 test 65C816 TYX Instruction
|
|
|
|
|
ldx #0
|
|
|
|
|
.OP 65816
|
|
|
|
|
tyx TYX: if 65C816, x becomes non-zero
|
|
|
|
|
.OP 65C02
|
|
|
|
|
bne .9 worked! 65C816
|
|
|
|
|
|
|
|
|
|
dey y=2 -> R65C02
|
|
|
|
|
ldx $EA save zp $EA
|
|
|
|
|
stz $EA store 0 in $EA
|
|
|
|
|
* .OP 65R02
|
|
|
|
|
.HS F7EA For compatibility with A2osX.ASM
|
|
|
|
|
* smb 7,$EA if not Rockwell, assemble as nop nop
|
|
|
|
|
* .OP 65C02
|
|
|
|
|
asl $EA cs if Rockwell
|
|
|
|
|
stx $EA restore zp $EA
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
dey y=1 -> 65C02
|
|
|
|
|
|
|
|
|
|
.9 tya
|
|
|
|
|
ora #$60
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Out:
|
|
|
|
|
* A = Z80 Slot
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DetectZ80 ldx #Z80Code.Size
|
|
|
|
|
.1 lda Z80Code.Start-1,x
|
2018-07-04 14:59:12 +00:00
|
|
|
|
sta Z80CODE-1,x 00000H for Z80
|
2017-08-22 06:38:16 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
stz ZPPtr1
|
|
|
|
|
lda #$C1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
.2 sta (ZPPtr1)
|
|
|
|
|
lda $100D
|
|
|
|
|
bmi .8
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
cmp #$C8
|
|
|
|
|
beq .9 CS
|
|
|
|
|
clc
|
|
|
|
|
adc #$20
|
|
|
|
|
sta $100A
|
|
|
|
|
bra .2
|
|
|
|
|
|
|
|
|
|
.8 lda ZPPtr1+1
|
|
|
|
|
and #$0F
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Setup AuxLC $FFFE->Kernel IRQ Handler
|
|
|
|
|
* if irq not handled, jmp (S.IrqMgrOldFFFE)
|
|
|
|
|
*--------------------------------------
|
2017-08-31 15:35:15 +00:00
|
|
|
|
IrqMgrInit >LDYAI MSG.IRQ
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-04-10 15:03:29 +00:00
|
|
|
|
php
|
|
|
|
|
sei
|
|
|
|
|
>LDYA $FFFE
|
2018-04-28 12:10:58 +00:00
|
|
|
|
>STYA K.IrqHAuxLC.JMP+1
|
2018-04-10 15:03:29 +00:00
|
|
|
|
>LDYAI K.IrqHAuxLC
|
|
|
|
|
>STYA $FFFE
|
|
|
|
|
|
|
|
|
|
>LDYAI GP.IrqH
|
|
|
|
|
>STYA K.MLI.PARAMS+2
|
|
|
|
|
|
|
|
|
|
>MLICALL MLIALLOCIRQ
|
|
|
|
|
bcs .90
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-10 15:03:29 +00:00
|
|
|
|
lda K.MLI.PARAMS+1
|
|
|
|
|
sta IRQ.INTNUM
|
|
|
|
|
|
|
|
|
|
plp
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
jsr IrqMgrInit.TClock
|
2017-10-11 15:37:41 +00:00
|
|
|
|
bcs .1
|
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
lda #"C"
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta IRQ.Mode
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-10 15:03:29 +00:00
|
|
|
|
>LDYAI K.IrqH.TCLOCK
|
|
|
|
|
>STYA K.IrqHAuxLC.JSR+1
|
2018-04-27 14:35:55 +00:00
|
|
|
|
>STYA GP.IrqH.JSR+1
|
2018-04-10 15:03:29 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
>LDYAI MSG.IRQ.CLOCK
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-04-05 20:32:22 +00:00
|
|
|
|
|
|
|
|
|
.1 jsr IrqMgrInit.Mouse
|
2017-10-11 15:37:41 +00:00
|
|
|
|
bcs .8
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
lda #"V"
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta IRQ.Mode
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-10 15:03:29 +00:00
|
|
|
|
>LDYAI K.IrqH.VBL
|
|
|
|
|
>STYA K.IrqHAuxLC.JSR+1
|
2018-04-27 14:35:55 +00:00
|
|
|
|
>STYA GP.IrqH.JSR+1
|
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
>LDYAI MSG.IRQ.VBL
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-04-05 20:32:22 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
.8 jsr IrqMgrInit.HZ2Tick
|
|
|
|
|
|
2017-12-18 16:36:21 +00:00
|
|
|
|
lda #"P"
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta IRQ.Mode
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI MSG.IRQ.POLL
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-04-10 15:03:29 +00:00
|
|
|
|
|
|
|
|
|
.90 plp
|
2018-04-05 20:32:22 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IrqMgrInit.TClock
|
2019-01-04 13:17:31 +00:00
|
|
|
|
stz ZPPtr1 Try finding a TClock Card...
|
2018-04-05 20:32:22 +00:00
|
|
|
|
lda #$C1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
2018-10-15 06:25:40 +00:00
|
|
|
|
.1 ldy #TClock.SIG.Cnt-1
|
2018-04-05 20:32:22 +00:00
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
cmp TClock.SIG,y
|
|
|
|
|
bne .3
|
|
|
|
|
dey
|
|
|
|
|
bpl .2
|
|
|
|
|
bra .4
|
|
|
|
|
|
|
|
|
|
.3 inc ZPPtr1+1 no match, try next slot....
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
cmp #$C8
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.4 lda ZPPtr1+1 get $Cn
|
|
|
|
|
and #$f
|
|
|
|
|
tax get $0n
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
tay get $n0
|
|
|
|
|
sty IRQ.VBL.n0
|
|
|
|
|
|
2018-12-01 19:39:44 +00:00
|
|
|
|
lda #A2osX.S.CLK
|
|
|
|
|
sta A2osX.S,x
|
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
php
|
|
|
|
|
sei
|
|
|
|
|
|
2018-12-01 19:39:44 +00:00
|
|
|
|
lda #$40+$20 Enable interrupt + 64Hz
|
2018-04-05 20:32:22 +00:00
|
|
|
|
sta $c080,y
|
2018-12-01 19:39:44 +00:00
|
|
|
|
|
|
|
|
|
lda #$40
|
|
|
|
|
sta CLRPAGE2
|
2018-04-05 20:32:22 +00:00
|
|
|
|
sta $478,x
|
|
|
|
|
sta $7f8,x
|
|
|
|
|
|
|
|
|
|
lda #64
|
|
|
|
|
sta CORE.TickPerSec
|
|
|
|
|
sta CORE.TickSec
|
|
|
|
|
|
|
|
|
|
lda #11
|
2017-10-11 15:37:41 +00:00
|
|
|
|
sta CORE.TickPer10t
|
|
|
|
|
sta CORE.Tick10t
|
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
dec CORE.IRQMode
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
|
|
|
|
|
clc
|
2017-10-11 15:37:41 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IrqMgrInit.Mouse
|
2017-08-22 06:38:16 +00:00
|
|
|
|
stz ZPPtr1 Try finding a Mouse Card...
|
|
|
|
|
lda #$C1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
.1 ldx #Mouse.SIG-Mouse.OFS-1
|
|
|
|
|
|
|
|
|
|
.2 ldy Mouse.OFS,x
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp Mouse.SIG,x
|
|
|
|
|
bne .3
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
bra .4
|
|
|
|
|
|
|
|
|
|
.3 inc ZPPtr1+1 no match, try next slot....
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
cmp #$C8
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.4 lda ZPPtr1+1
|
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
sta .11+2
|
2018-04-28 12:10:58 +00:00
|
|
|
|
sta K.IrqH.VBL.MSM+2
|
|
|
|
|
sta K.IrqH.VBL.MRM+2
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
and #$0f
|
2017-10-27 14:56:46 +00:00
|
|
|
|
sta IRQ.VBL.0n
|
2017-08-22 06:38:16 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
|
2017-10-27 14:56:46 +00:00
|
|
|
|
sta IRQ.VBL.n0
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
php
|
|
|
|
|
sei
|
|
|
|
|
|
2017-09-21 15:29:45 +00:00
|
|
|
|
bit RROMBNK2 Renable ROM to allow MOUSE II firmware works properly
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
ldy #INITMOUSE
|
|
|
|
|
jsr .10
|
|
|
|
|
|
|
|
|
|
ldy #SETMOUSE
|
|
|
|
|
lda #MOUSEMODx.INTVBL+MOUSEMODx.ACTIVE
|
|
|
|
|
jsr .10
|
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bit RRAMWRAMBNK1 Back To LC Ram
|
|
|
|
|
bit RRAMWRAMBNK1
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
ldy #SERVEMOUSE
|
|
|
|
|
lda (ZPPtr1),y
|
2018-04-28 12:10:58 +00:00
|
|
|
|
sta K.IrqH.VBL.MSM+1
|
2018-04-05 20:32:22 +00:00
|
|
|
|
|
|
|
|
|
ldy #READMOUSE
|
|
|
|
|
lda (ZPPtr1),y
|
2018-04-28 12:10:58 +00:00
|
|
|
|
sta K.IrqH.VBL.MRM+1
|
2018-04-05 20:32:22 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
jsr IrqMgrInit.HZ2Tick
|
|
|
|
|
|
|
|
|
|
dec CORE.IRQMode
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
plp
|
2017-10-11 15:37:41 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2017-09-21 15:29:45 +00:00
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
.9 plp
|
|
|
|
|
sec
|
2017-08-22 06:38:16 +00:00
|
|
|
|
rts
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
.10 pha
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
sta .11+1
|
|
|
|
|
pla
|
2017-12-18 16:36:21 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
ldx .11+2 Cn
|
|
|
|
|
ldy IRQ.VBL.n0
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
.11 jmp $ffff SELF MODIFIED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IrqMgrInit.HZ2Tick
|
|
|
|
|
ldx #50
|
|
|
|
|
lda A2osX.HZ
|
2017-10-11 15:37:41 +00:00
|
|
|
|
sta CORE.TickPer10t
|
|
|
|
|
sta CORE.Tick10t
|
2018-04-05 20:32:22 +00:00
|
|
|
|
cmp #5
|
|
|
|
|
beq .1
|
|
|
|
|
ldx #60
|
2017-10-11 15:37:41 +00:00
|
|
|
|
|
2018-04-05 20:32:22 +00:00
|
|
|
|
.1 stx CORE.TickPerSec
|
|
|
|
|
stx CORE.TickSec
|
|
|
|
|
|
2017-10-11 15:37:41 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-08-31 15:35:15 +00:00
|
|
|
|
DevMgrInit >LDYAI MSG.DEV
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2018-07-11 15:13:29 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
lda DEVCNT
|
|
|
|
|
sta DevMgrInit.DEVCNT
|
|
|
|
|
|
|
|
|
|
.1 ldx DevMgrInit.DEVCNT
|
|
|
|
|
lda DEVLST,x
|
|
|
|
|
|
2017-11-08 07:14:35 +00:00
|
|
|
|
and #$F0
|
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
asl
|
|
|
|
|
php Save Drive 1/2 in C
|
2017-11-08 07:14:35 +00:00
|
|
|
|
ror DSSS0000
|
2017-11-07 16:28:34 +00:00
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
2017-11-08 07:14:35 +00:00
|
|
|
|
|
|
|
|
|
tax 000DSSS0
|
|
|
|
|
lsr 0000DSSS
|
|
|
|
|
and #$7
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.BUSID
|
2017-11-07 16:28:34 +00:00
|
|
|
|
|
2018-01-09 16:31:56 +00:00
|
|
|
|
lda DEVPTRS,x
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.BUSPTR
|
2018-06-22 06:24:35 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
lda DEVPTRS+1,x
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.BUSPTR+1
|
2018-01-09 16:31:56 +00:00
|
|
|
|
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
stz ZPPtr1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
plp
|
|
|
|
|
lda #0
|
|
|
|
|
adc #1 Make DevID 1 or 2
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.DEVID
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
lda ZPPtr1+1
|
2017-11-08 07:14:35 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
cmp #$D0 Disk II Driver is $D000
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
jsr DevMgrInit.DII
|
|
|
|
|
lda #A2osX.S.DII
|
|
|
|
|
bra .7 Go mark slot as USED
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.2 cmp #$FF /RAM is always $FF00
|
|
|
|
|
bne .3
|
|
|
|
|
jsr DevMgrInit.RAM
|
|
|
|
|
bra .8
|
|
|
|
|
|
2018-01-09 16:31:56 +00:00
|
|
|
|
.3 and #$F0
|
2017-11-07 16:28:34 +00:00
|
|
|
|
cmp #$C0
|
|
|
|
|
beq .4
|
|
|
|
|
|
2018-06-22 06:24:35 +00:00
|
|
|
|
jsr DevMgrInit.USR Outside ROM space, User loaded BLK dev
|
2017-11-07 16:28:34 +00:00
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.4 ldx #SmartPort.SIG-SmartPort.OFS-1
|
|
|
|
|
|
2018-06-22 06:24:35 +00:00
|
|
|
|
.5 ldy SmartPort.OFS,x Check if there is a smartport firmware
|
2017-08-22 06:38:16 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp SmartPort.SIG,x
|
2018-06-22 06:24:35 +00:00
|
|
|
|
bne .8 not a Disk Controller...
|
2017-08-22 06:38:16 +00:00
|
|
|
|
dex
|
2017-11-07 16:28:34 +00:00
|
|
|
|
bpl .5
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
ldy #7
|
|
|
|
|
lda (ZPPtr1),y
|
2019-02-13 16:20:44 +00:00
|
|
|
|
beq .51 $Cn07=00 : SmartPort
|
|
|
|
|
bne .6
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2019-02-13 16:20:44 +00:00
|
|
|
|
ldx #AWSmartPort.SIG-AWSmartPort.OFS-1
|
|
|
|
|
|
|
|
|
|
.50 ldy AWSmartPort.OFS,x Check if there is a AWsmartport firmware
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp AWSmartPort.SIG,x
|
|
|
|
|
bne .6 not on AW
|
|
|
|
|
dex
|
|
|
|
|
bpl .50
|
|
|
|
|
|
|
|
|
|
.51 lda ZPPtr1+1 get $Cn
|
2018-06-22 06:24:35 +00:00
|
|
|
|
and #$f get $0n
|
2019-02-13 16:20:44 +00:00
|
|
|
|
cmp FD.BDEV+S.FD.DEV.BUSID same as SSS ?
|
|
|
|
|
beq .52
|
2017-11-07 16:28:34 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
inc FD.BDEV+S.FD.DEV.DEVID Remapped SP devices....
|
|
|
|
|
inc FD.BDEV+S.FD.DEV.DEVID Add 2 to DEVID (2 & 3)
|
2017-11-07 16:28:34 +00:00
|
|
|
|
|
2019-02-13 16:20:44 +00:00
|
|
|
|
.52 jsr DevMgrInit.SP
|
2017-11-07 16:28:34 +00:00
|
|
|
|
lda #A2osX.S.SP
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bra .7
|
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.6 jsr DevMgrInit.BLK
|
|
|
|
|
lda #A2osX.S.BLK
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.7 ldx FD.BDEV+S.FD.DEV.BUSID
|
2017-10-19 15:27:38 +00:00
|
|
|
|
sta A2osX.S,x
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-11-07 16:28:34 +00:00
|
|
|
|
.8 dec DevMgrInit.DEVCNT
|
2018-01-09 16:31:56 +00:00
|
|
|
|
bmi .80
|
|
|
|
|
jmp .1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-11-08 07:14:35 +00:00
|
|
|
|
.80 clc
|
2017-08-22 06:38:16 +00:00
|
|
|
|
rts
|
2017-11-07 16:28:34 +00:00
|
|
|
|
DevMgrInit.DEVCNT
|
|
|
|
|
.BS 1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-22 06:24:35 +00:00
|
|
|
|
DevMgrInit.DII >LDYAI DRV.DiskII
|
2018-07-09 15:25:38 +00:00
|
|
|
|
jmp DevMgrInit.AddBDev
|
2017-11-07 16:28:34 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-22 06:24:35 +00:00
|
|
|
|
DevMgrInit.RAM >LDYAI DRV.RamDrive
|
2018-07-09 15:25:38 +00:00
|
|
|
|
jmp DevMgrInit.AddBDev
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
2018-06-22 06:24:35 +00:00
|
|
|
|
DevMgrInit.USR >LDYAI DRV.BlkDevice
|
2018-07-09 15:25:38 +00:00
|
|
|
|
jmp DevMgrInit.AddBDev
|
2018-01-09 16:31:56 +00:00
|
|
|
|
*--------------------------------------
|
2017-08-22 06:38:16 +00:00
|
|
|
|
DevMgrInit.BLK ldy #$ff
|
|
|
|
|
lda (ZPPtr1),y
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.BUSPTR
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-06-22 06:24:35 +00:00
|
|
|
|
>LDYAI DRV.BlkDevice
|
2018-07-09 15:25:38 +00:00
|
|
|
|
jmp DevMgrInit.AddBDev
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DevMgrInit.SP ldy #$ff
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
clc
|
|
|
|
|
adc #3 Compute smartport entry point
|
2018-01-09 16:31:56 +00:00
|
|
|
|
sta .1+1
|
2018-07-10 15:33:13 +00:00
|
|
|
|
sta FD.BDEV+S.FD.DEV.BUSPTR
|
2017-08-22 06:38:16 +00:00
|
|
|
|
lda ZPPtr1+1
|
2018-01-09 16:31:56 +00:00
|
|
|
|
sta .1+2
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda FD.BDEV+S.FD.DEV.DEVID
|
2019-02-13 16:20:44 +00:00
|
|
|
|
sta SP.IOCTL.STATUS+S.IOCTL.UNITNUM
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-01-09 16:31:56 +00:00
|
|
|
|
.1 jsr $ffff Self Modified
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.DA #0 Status
|
2019-02-13 16:20:44 +00:00
|
|
|
|
.DA SP.IOCTL.STATUS
|
2017-11-07 16:28:34 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2019-02-13 16:20:44 +00:00
|
|
|
|
ldx SP.IOCTL.STATUS.DIB+S.DIB.S
|
2018-07-10 15:33:13 +00:00
|
|
|
|
|
2018-06-22 06:24:35 +00:00
|
|
|
|
>LDYAI DRV.SmartPort
|
2018-07-09 15:25:38 +00:00
|
|
|
|
jsr DevMgrInit.AddBDev
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-07-09 15:25:38 +00:00
|
|
|
|
DevMgrInit.AddBDev
|
2018-07-10 15:33:13 +00:00
|
|
|
|
>STYA FD.BDEV+S.FD.DEV.DRVPTR
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda FD.BDEV+S.FD.DEV.BUSID
|
2017-08-22 06:38:16 +00:00
|
|
|
|
ora #$30
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sta FD.BDEV.NAME+1 SnDy
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-07-10 15:33:13 +00:00
|
|
|
|
lda FD.BDEV+S.FD.DEV.DEVID
|
2017-08-22 06:38:16 +00:00
|
|
|
|
ora #$30
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sta FD.BDEV.NAME+3 SxDn
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
>PUSHWI FD.BDEV.NAME
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 2
|
2018-07-13 14:38:24 +00:00
|
|
|
|
>LDYAI MSG.BLKDEV
|
|
|
|
|
>SYSCALL printf
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
>PUSHWI FD.BDEV.NAME
|
2018-07-10 15:33:13 +00:00
|
|
|
|
>LDYAI FD.BDEV
|
2018-07-17 15:45:59 +00:00
|
|
|
|
>SYSCALL MKDev
|
2017-08-22 06:38:16 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-08-31 15:35:15 +00:00
|
|
|
|
EvtMgrInit >LDYAI MSG.EVT
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2018-07-12 15:20:39 +00:00
|
|
|
|
|
2019-01-24 13:53:29 +00:00
|
|
|
|
stz CORE.EvtCount
|
|
|
|
|
|
2017-08-31 15:35:15 +00:00
|
|
|
|
lda #$A5
|
2017-08-22 06:38:16 +00:00
|
|
|
|
sta A2osX.TIMER16
|
|
|
|
|
lda #$9B
|
|
|
|
|
sta A2osX.TIMER16+1
|
|
|
|
|
|
2017-10-27 06:36:46 +00:00
|
|
|
|
lda /Evt.Table
|
2017-08-22 06:38:16 +00:00
|
|
|
|
sta pEvent+1
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-08-31 15:35:15 +00:00
|
|
|
|
TskMgrInit >LDYAI MSG.TSK
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI K.ENV.SIZE get a buffer for ENV
|
2019-01-22 16:35:42 +00:00
|
|
|
|
jsr K.GetMem
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2019-01-22 16:35:42 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
ldy #S.PS.ENVPAGECNT
|
|
|
|
|
lda /K.ENV.SIZE
|
|
|
|
|
sta (pPs),y
|
|
|
|
|
|
2017-08-22 06:38:16 +00:00
|
|
|
|
txa
|
2019-01-22 16:35:42 +00:00
|
|
|
|
* ldy #S.PS.hENV
|
|
|
|
|
iny
|
2017-08-22 06:38:16 +00:00
|
|
|
|
sta (pPs),y
|
2019-01-22 16:35:42 +00:00
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPPtr1) make sure blank!!
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2017-08-24 12:46:48 +00:00
|
|
|
|
>LDYAI K.Buf256
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>STYA K.MLI.PARAMS+1
|
|
|
|
|
>MLICALL MLIGETPREFIX
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2017-09-11 06:11:57 +00:00
|
|
|
|
ldy K.Buf256
|
|
|
|
|
iny
|
|
|
|
|
lda #0
|
2018-06-22 06:24:35 +00:00
|
|
|
|
jsr K.GetMem
|
2017-09-11 06:11:57 +00:00
|
|
|
|
>STYA ZPPtr1
|
2017-08-22 06:38:16 +00:00
|
|
|
|
txa
|
|
|
|
|
ldy #S.PS.hPREFIX
|
|
|
|
|
sta (pPs),y
|
2017-09-11 06:11:57 +00:00
|
|
|
|
|
|
|
|
|
ldy K.Buf256
|
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
.4 lda K.Buf256,y
|
|
|
|
|
dey
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPPtr1 push ENV value = PREFIX
|
2017-08-22 06:38:16 +00:00
|
|
|
|
|
2018-11-17 17:17:13 +00:00
|
|
|
|
>LDYAI I.ENV.ROOT push ENV name = ROOT
|
2017-08-22 06:38:16 +00:00
|
|
|
|
>SYSCALL SetEnv
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDYAI I.ENV.PATH
|
2018-06-22 06:24:35 +00:00
|
|
|
|
>SYSCALL PutEnv
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDYAI I.ENV.LIB
|
2018-06-22 06:24:35 +00:00
|
|
|
|
>SYSCALL PutEnv
|
2017-08-22 06:38:16 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDYAI I.ENV.DRV
|
2018-06-22 06:24:35 +00:00
|
|
|
|
>SYSCALL PutEnv
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-07-11 15:13:29 +00:00
|
|
|
|
* Modified CHARGET/CHARGOT for ROM CALL
|
|
|
|
|
* CHRGET .EQ $B1 - C8
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Kernel.ZP .PH $B1
|
|
|
|
|
CHARGET inc TXTPTR
|
|
|
|
|
bne CHARGOT
|
|
|
|
|
inc TXTPTR+1
|
|
|
|
|
|
|
|
|
|
CHARGOT lda $ffff
|
|
|
|
|
beq IsDigit.9
|
|
|
|
|
|
|
|
|
|
IsDigit cmp #'0'
|
|
|
|
|
bcc IsDigit.9
|
|
|
|
|
cmp #'9'+1
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
IsDigit.9 sec
|
|
|
|
|
rts
|
|
|
|
|
.EP
|
|
|
|
|
Kernel.ZP.S .EQ *-Kernel.ZP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Z80Code.Start .HS 31FF00 START: LD SP,000FFH Init Stack
|
|
|
|
|
.HS 3EFF LD A,0FFH Set Flag
|
|
|
|
|
.HS 320D00 LD (FLAG),A
|
|
|
|
|
.HS 3200E1 LD (0E100H),A Back to 6502
|
|
|
|
|
.HS 18F3 JR START Loop
|
|
|
|
|
.HS 00 FLAG: .DB 0
|
|
|
|
|
Z80Code.Size .EQ *-Z80Code.Start
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Mouse.OFS .HS 05070B0CFB
|
|
|
|
|
Mouse.SIG .HS 38180120D6
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
TClock.SIG .HS 0878282c58ff700538b00118b8087848
|
|
|
|
|
.HS 8a489848adffcf201ac86868ba8df807
|
2018-10-15 06:25:40 +00:00
|
|
|
|
TClock.SIG.Cnt .EQ *-TClock.SIG
|
2018-07-11 15:13:29 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-12 15:20:39 +00:00
|
|
|
|
MSG.Init2 .AZ "A2osX[Stage2]:Init\nRelocating Kernel...\n"
|
2018-04-10 15:03:29 +00:00
|
|
|
|
MSG.HZ .AZ "Kernel SYS Timer Set For %d0 hz Machine.\n"
|
2018-07-13 14:38:24 +00:00
|
|
|
|
MSG.KCREAD .AZ "Reading Kernel Config File..."
|
|
|
|
|
MSG.KCREAD.OK .AZ "OK\n"
|
|
|
|
|
MSG.KCREAD.KO .AZ "\nError While Reading Kernel Config File, Using Default.\n"
|
2018-04-10 15:03:29 +00:00
|
|
|
|
MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n"
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
2018-10-15 06:25:40 +00:00
|
|
|
|
SYSSCREEN.TOP .AZ "A2osX 0.92 Console"
|
2018-12-14 16:19:05 +00:00
|
|
|
|
MSG.Init3 .AZ "A2osX[Stage3]:Init *** Press Ctrl-R for ROOT Mode ***"
|
2018-08-22 15:23:27 +00:00
|
|
|
|
MSG.DEV .AZ "Device Manager..."
|
2018-07-20 11:51:08 +00:00
|
|
|
|
MSG.BLKDEV .AZ " Adding : /DEV/%s\r\n"
|
2018-08-22 15:23:27 +00:00
|
|
|
|
MSG.IRQ .AZ "Interrupt Manager..."
|
|
|
|
|
MSG.IRQ.VBL .AZ " Mouse VBL IRQ Activated."
|
|
|
|
|
MSG.IRQ.CLOCK .AZ " Clock Card IRQ Activated."
|
|
|
|
|
MSG.IRQ.POLL .AZ " Polling Mode."
|
|
|
|
|
MSG.EVT .AZ "Event Manager..."
|
|
|
|
|
MSG.TSK .AZ "Task Manager..."
|
2018-07-20 11:51:08 +00:00
|
|
|
|
MSG.Prefix .AZ "Root:%s\r\n"
|
2018-12-15 20:34:55 +00:00
|
|
|
|
MSG.CTRLR .AZ "Ctrl-R Pressed, entering ROOT mode..."
|
2019-01-04 13:17:31 +00:00
|
|
|
|
MSG.ETCINIT .AZ "Executing %s..."
|
2018-04-10 15:03:29 +00:00
|
|
|
|
MSG.StartupErr .AZ "Failed : [$%h]\r\n"
|
2018-10-05 14:58:38 +00:00
|
|
|
|
MSG.Init3.OK .AZ "OK\r\nA2osX[Stage3]:Complete.\r\n"
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
2018-04-10 15:03:29 +00:00
|
|
|
|
MSG.CPU .AZ "Checking CPU..."
|
2018-07-13 14:38:24 +00:00
|
|
|
|
MSG.CPUTYPE .DA MSG.6502
|
|
|
|
|
.DA MSG.65C02
|
|
|
|
|
.DA MSG.65R02
|
|
|
|
|
.DA MSG.65816
|
2018-08-22 15:23:27 +00:00
|
|
|
|
MSG.6502 .AZ "6502."
|
|
|
|
|
MSG.65C02 .AZ "65C02."
|
|
|
|
|
MSG.65R02 .AZ "65R02."
|
|
|
|
|
MSG.65816 .AZ "65816."
|
2018-10-03 15:25:03 +00:00
|
|
|
|
MSG.CPU.SPEED .AZ "Checking CPU Speed..."
|
2018-07-13 14:38:24 +00:00
|
|
|
|
MSG.CPU.SPEEDOK .AZ "%d.%02d Mhz.\r\n"
|
2018-10-03 15:25:03 +00:00
|
|
|
|
MSG.Z80 .AZ "Checking Z80 CPU..."
|
2018-07-13 14:38:24 +00:00
|
|
|
|
MSG.Z80.OK .AZ "Detected In Slot %d.\r\n"
|
2018-08-22 15:23:27 +00:00
|
|
|
|
MSG.Z80.KO .AZ "Not Detected."
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-11 16:41:25 +00:00
|
|
|
|
DEV.CONSOLE .AZ "/DEV/CONSOLE"
|
2018-11-17 17:17:13 +00:00
|
|
|
|
I.ENV.ROOT .AZ "ROOT"
|
|
|
|
|
I.ENV.PATH .AZ "PATH=${ROOT}SBIN/:${ROOT}BIN/"
|
|
|
|
|
I.ENV.LIB .AZ "LIB=${ROOT}LIB/"
|
|
|
|
|
I.ENV.DRV .AZ "DRV=${ROOT}DRV/"
|
2019-03-02 20:47:58 +00:00
|
|
|
|
CTRLR.SHELL .AZ "${ROOT}BIN/SH"
|
2018-11-22 16:39:41 +00:00
|
|
|
|
ETCINIT.CMDLINE .AZ "${ROOT}ETC/INIT"
|
2017-08-22 06:38:16 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MLIOPEN00 .DA #3
|
|
|
|
|
.DA A2OSXCONF
|
2017-11-22 16:27:50 +00:00
|
|
|
|
.DA $B000
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.BS 1
|
|
|
|
|
A2OSXCONF >PSTR "A2osX.KCONFIG"
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MLIREAD00 .DA #4
|
|
|
|
|
.BS 1
|
2018-10-08 05:55:28 +00:00
|
|
|
|
.DA A2osX.KCONFIG
|
2017-08-22 06:38:16 +00:00
|
|
|
|
.DA 16
|
|
|
|
|
.BS 2
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MLICLOSE00 .DA #1
|
|
|
|
|
.BS 1
|
|
|
|
|
*--------------------------------------
|
2018-07-11 15:13:29 +00:00
|
|
|
|
FD.NULL .DA #S.FD.T.CDEV
|
|
|
|
|
.DA #0 HANDLER
|
|
|
|
|
.DA #0 BUSID
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA #0 DEVID
|
2018-07-12 15:20:39 +00:00
|
|
|
|
.DA 0 BUSPTR
|
2018-07-11 15:13:29 +00:00
|
|
|
|
.DA DRV.NULL
|
2018-12-13 16:39:24 +00:00
|
|
|
|
.DA 0 DCBPTR
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA 0 BUFPTR
|
|
|
|
|
FD.NULL.NAME .AZ "NULL" NAME
|
2018-07-11 15:13:29 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-10 16:45:37 +00:00
|
|
|
|
FD.TTY .DA #S.FD.T.CDEV
|
|
|
|
|
.DA #0 HANDLER
|
|
|
|
|
.DA #0 BUSID
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA #1 DEVID
|
|
|
|
|
.DA 0 BUSPTR
|
2018-12-13 16:39:24 +00:00
|
|
|
|
.DA DRV.TERM
|
|
|
|
|
.BS 2 DCBPTR
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.BS 2 BUFPTR
|
2018-12-13 16:39:24 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
FD.CONSOLE.NAME .AZ "CONSOLE"
|
2018-12-11 16:41:25 +00:00
|
|
|
|
FD.TTY.NAME .AZ "TTY0"
|
2018-12-10 16:45:37 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-11 15:13:29 +00:00
|
|
|
|
FD.BDEV .DA #S.FD.T.BDEV
|
|
|
|
|
.DA #0 HANDLER
|
|
|
|
|
.DA #0 BUSID
|
|
|
|
|
.DA #0 DEVID
|
2018-07-12 15:20:39 +00:00
|
|
|
|
.BS 2 BUSPTR
|
2018-07-11 15:13:29 +00:00
|
|
|
|
.BS 2 DRVPTR
|
2018-12-13 16:39:24 +00:00
|
|
|
|
.DA 0 DCBPTR
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA 0 BUFPTR
|
|
|
|
|
FD.BDEV.NAME .AZ "S1D1"
|
2018-07-11 15:13:29 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
SmartPort.OFS .HS 010305
|
|
|
|
|
SmartPort.SIG .HS 200003
|
2019-02-13 16:20:44 +00:00
|
|
|
|
AWSmartPort.OFS .HS 12131415161718191A1B
|
|
|
|
|
AWSmartPort.SIG .HS A9008DF2C0A9708DF3C0
|
2018-07-11 15:13:29 +00:00
|
|
|
|
*--------------------------------------
|
2019-02-13 16:20:44 +00:00
|
|
|
|
SP.IOCTL.STATUS .DA #3
|
|
|
|
|
.BS 1 UNITNUM
|
|
|
|
|
.DA SP.IOCTL.STATUS.DIB
|
|
|
|
|
.DA #S.IOCTL.STATCODE.GETDIB
|
|
|
|
|
SP.IOCTL.STATUS.DIB
|
2018-07-19 15:33:55 +00:00
|
|
|
|
.BS S.DIB
|
2018-07-11 15:13:29 +00:00
|
|
|
|
*--------------------------------------
|
2017-08-22 06:38:16 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.INIT
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
2017-08-22 06:38:16 +00:00
|
|
|
|
ASM
|