Mercurial > hg > Members > kono > os9 > sbc09
changeset 14:3f18c1fa9132
add boot and sysgo
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Jul 2018 15:09:42 +0900 |
parents | 2aebc6b17fbf |
children | bb6a2a9f59f1 |
files | os9/Makefile os9/level2/boot.asm os9/level2/sysgo.asm |
diffstat | 3 files changed, 198 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/os9/Makefile Sat Jul 07 12:45:31 2018 +0900 +++ b/os9/Makefile Sat Jul 07 15:09:42 2018 +0900 @@ -1,4 +1,4 @@ -all: os9mod makerom os9disass os9.rom +all: os9mod makerom os9disass os9d.rom os9lv2.rom CC=clang CFLAGS = -g
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os9/level2/boot.asm Sat Jul 07 15:09:42 2018 +0900 @@ -0,0 +1,72 @@ +******************************************************************** +* Boot - V09 Boot module +* +* $Id: boot_1773.asm,v 1.1.1.1 2001/02/21 23:30:54 boisy Exp $ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ + + nam Boot + ttl v09 Boot module + +* ifp1 + use defsfile +* endc + +* +* map extended rom on page 0x40- +* valid page started from 0x87cd + +tylg set Systm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 1 + + mod eom,name,tylg,atrv,start,size + +size equ . + +name fcs /Boot/ + fcb edition + +start ldd #$40 + ldx #0 + pshs d,x +loop ldx 2,s + leay ,s + lda #$44 less than 3 block + cmpa 1,s + beq last + os9 F$LDAXY + bcs last + cmpa #M$ID1 $87 + beq checkmod + bra last + +checkmod ldx 2,s + tfr s,d + os9 F$VModul + bcs last + ldx 2,s + leay ,s + ldd #2 + os9 F$LDDDXY + bcs last + ldx 2,s + leax d,x +a2 cmpx #$1fff + ble a1 + inc 1,s increment DAT block + leax -$2000,x + bra a2 +a1 stx 2,s + bra loop + + +last puls d,y + clrb + rts + + emod +eom equ * + end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os9/level2/sysgo.asm Sat Jul 07 15:09:42 2018 +0900 @@ -0,0 +1,125 @@ +******************************************************************** +* SysGo - Kickstart program module +* +* $Id: sysgo.asm,v 1.1.1.1 2001/02/21 23:30:54 boisy Exp $ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ + + nam Sysgo + ttl Kickstart program module + + ifp1 + use defsfile + use scfdefs + endc + +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 +edition set $01 + + mod eom,name,tylg,atrv,start,size + +size equ . + +name fcs /Sysgo/ + fcb edition + +Banner fcc / OS-9 LEVEL TWO VR. 0/ + fcb 48+OS9Vrsn + fcc /.0/ + fcb 48+OS9Major + fcc /.0/ + fcb 48+OS9Minor + fcb C$CR,C$LF + fcc / COPYRIGHT 1988 BY/ + fcb C$CR,C$LF + fcc / MICROWARE SYSTEMS CORP./ + fcb C$CR,C$LF + fcc / LICENSED TO TANDY CORP./ + fcb C$CR,C$LF + fcc / ALL RIGHTS RESERVED./ + fcb C$CR,C$LF + fcb C$LF +BannLen equ *-Banner +DefDev fcc "/D0" + fcb C$CR +HDDev fcc "/D0/" +ExecDir fcc "Cmds" + fcb C$CR + fcc ",,,,," +Shell fcc "Shell" + fcb C$CR + fcc ",,,,," +ShellPrm fcc "i=/1" +CRtn fcb C$CR + fcc ",,,,," +ShellPL equ *-ShellPrm + + +start leax >IcptRtn,pcr + os9 F$Icpt + os9 F$ID + ldb #$80 + os9 F$SPrior + leax >Banner,pcr + ldy #BannLen + lda #$01 standard output + os9 I$Write write out banner + leax >DefTime,pcr + os9 F$STime set time to default + leax >ExecDir,pcr + lda #EXEC. + os9 I$ChgDir change exec. dir + leax >DefDev,pcr + lda #READ.+WRITE. + os9 I$ChgDir change data dir. + bcs L0125 + leax >HDDev,pcr + lda #EXEC. + os9 I$ChgDir change exec. dir to HD +L0125 pshs u,y + os9 F$ID + bcs L01A9 + leax ,u + os9 F$GPrDsc + bcs L01A9 + leay ,u + ldx #$0000 + ldb #$01 + os9 F$MapBlk + bcs L01A9 +* Copy our default I/O ptrs to the system process + ldd <D.SysPrc,u + leau d,u + leau <P$DIO,u + leay <P$DIO,y + ldb #DefIOSiz-1 +L0151 lda b,y + sta b,u + decb + bpl L0151 +L0186 puls u,y + leax >ShellPrm,pcr + leay ,u + ldb #ShellPL +L0190 lda ,x+ + sta ,y+ + decb + bne L0190 +* Fork final shell here + leax >Shell,pcr + ldd #$0100 + ldy #ShellPL + os9 F$Chain +L01A5 ldb #$06 + bra Crash +L01A9 ldb #$04 +Crash jmp <D.Crash + +IcptRtn rti + + emod +eom equ * + end