Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-08-30 19:50:57 +02:00
parent 7b61dc9118
commit 000add394a
15 changed files with 292 additions and 80 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -88,8 +88,9 @@ CS.RUN
ldy #1 ldy #1
lda (ZPPtr1),y lda (ZPPtr1),y
ldx OptionList ldx #OptionVars-OptionList
.2 cmp OptionList,x
.2 cmp OptionList-1,x
beq .3 beq .3
dex dex
bne .2 bne .2
@ -580,12 +581,16 @@ CS.RUN.GetOutputBuf
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.WriteOutput CS.RUN.WriteOutput
>LDA.G bNoHeader
bmi .1
>PUSHWI S.BM >PUSHWI S.BM
>PUSHEA.G PIX.Header >PUSHEA.G PIX.Header
>LDA.G hOutputFile >LDA.G hOutputFile
>SYSCALL FWrite >SYSCALL FWrite
bcs .9 bcs .9
>PUSHW.G OutputDataLen
.1 >PUSHW.G OutputDataLen
>PUSHW ZPOutputBuf >PUSHW ZPOutputBuf
>LDA.G hOutputFile >LDA.G hOutputFile
>SYSCALL FWrite >SYSCALL FWrite
@ -694,8 +699,8 @@ CS.END
*-------------------------------------- *--------------------------------------
.INB usr/src/shared/x.twist.g .INB usr/src/shared/x.twist.g
*-------------------------------------- *--------------------------------------
OptionList >PSTR "Vv" OptionList .AS "VvHh"
OptionVars .DA #bVerbose,#bVerbose OptionVars .DA #bVerbose,#bVerbose,#bNoHeader,#bNoHeader
MSG.USAGE .AS "Usage : BMP2PIX BMP-File \r\n" MSG.USAGE .AS "Usage : BMP2PIX BMP-File \r\n"
.AZ " -V : Verbose Mode\r\n" .AZ " -V : Verbose Mode\r\n"
MSG.HEADER.OK .AZ "BMP Size : %D x %D pixels, %d bit(s)/pixel\r\n" MSG.HEADER.OK .AZ "BMP Size : %D x %D pixels, %d bit(s)/pixel\r\n"
@ -769,6 +774,7 @@ PALETTE.AUX .HS 00.01.02.03.04.05.06.07
DS.START DS.START
ArgCount .BS 1 ArgCount .BS 1
bVerbose .BS 1 bVerbose .BS 1
bNoHeader .BS 1
hInputFile .BS 1 hInputFile .BS 1
hInputBuf .BS 1 hInputBuf .BS 1
hOutputFile .BS 1 hOutputFile .BS 1

View File

@ -1,7 +1,7 @@
NEW NEW
AUTO 3,1 AUTO 3,1
*-------------------------------------- *--------------------------------------
IO.D2.SeekTime .EQ 75 IO.D2.SeekTime .EQ 85
*-------------------------------------- *--------------------------------------
IO.D2.Ph0Off .EQ $C080 IO.D2.Ph0Off .EQ $C080
IO.D2.Ph0On .EQ $C081 IO.D2.Ph0On .EQ $C081

View File

@ -9,12 +9,7 @@ ILDR.START jsr MLI check for file 'atinit'
cmp #MLI.E.FNOTFND cmp #MLI.E.FNOTFND
beq ILDR.SYSTEM if so, continue loading interpreter beq ILDR.SYSTEM if so, continue loading interpreter
ATINIT.KO ldx #ATINIT.ERR.LEN-1 ATINIT.KO jmp badatinit
.1 lda ATINIT.ERR,x
sta vline16,x
dex
bne .1
beq *
gfi_ok lda gfi_type gfi_ok lda gfi_type
cmp #$E2 is 'atinit' correct file type? cmp #$E2 is 'atinit' correct file type?
@ -68,113 +63,149 @@ H2453 ldy #$10 check file type.
lda #$FF must be a prodos sys file lda #$FF must be a prodos sys file
eor (idxl),y eor (idxl),y
bne H2432 if not sys. bne H2432 if not sys.
tay see if active tay see if active
lda (idxl),y lda (idxl),y
beq H2432 if deleted file. beq H2432 if deleted file.
and #$0F strip file 'kind'. and #$0F strip file 'kind'.
sta pbuf save length of name. sta pbuf save length of name.
cmp #$08 must be at least 'x.system' cmp #$08 must be at least 'x.system'
bcc H2432 else, ignore it. bcc H2432 else, ignore it.
tay compare last 7 chars for '.system' tay compare last 7 chars for '.system'
ldx #$06 ldx #$06
H246C lda (idxl),y H246C lda (idxl),y
eor iterp,x eor iterp,x
asl asl ignore bit 7
bne H2432 branch if something else bne H2432 branch if something else
dey dey
dex dex
bpl H246C bpl H246C
ldy #$00 ldy #$00
H247A iny H247A iny
lda (idxl),y lda (idxl),y
sta pbuf,y sta pbuf,y
ora #$80 msb on so can be displayed if error
sta iomess+$11,y
cpy pbuf cpy pbuf
bne H247A bne H247A
lda #$A0 space after name
sta iomess+$12,y
tya error message length
adc #$13 (carry set)
sta ierlen
jsr MLI open interpreter file jsr MLI open interpreter file
.DA #$C8 .DA #$C8
.DA opparm .DA opparm
bne badlod bne badlod
jsr MLI get eof (length of file) jsr MLI get eof (length of file)
.DA #$D1 .DA #$D1
.DA efparm .DA efparm
bne badlod bne badlod
lda eof+2 lda eof+2
bne toolong bne toolong
lda eof+1 lda eof+1
cmp #$9F max size = 39.75k ($2000-$BF00) cmp #$9F max size = 39.75k ($2000-$BF00)
bcs toolong bcs toolong
sta rdlen+1 sta rdlen+1
lda eof lda eof
sta rdlen (read entire file) sta rdlen (read entire file)
jsr MLI read interpreter file jsr MLI read interpreter file
.DA #$CA .DA #$CA
.DA rdparm .DA rdparm
beq H24C8 go close if successfully read. beq H24C8 go close if successfully read.
cmp #$56 memory conflict? cmp #$56 memory conflict?
beq toolong then too large beq toolong then too large
bne badlod else, unable to load. bne badlod else, unable to load.
H24C8 jsr MLI close interpreter file H24C8 jsr MLI close interpreter file
.DA #$CC .DA #$CC
.DA clparm .DA clparm
bne badlod hopefully never taken bne badlod hopefully never taken
lda RROMBNK2 enable ROM lda RROMBNK2 enable ROM
sta CLR80DISP
sta CLR80STORE
jsr init
jsr setvid
jsr setkbd
jsr home
jmp sysentry go run interpreter jmp sysentry go run interpreter
nointrp jsr MLI no interpreter found,so quit. nointrp jsr MLI no interpreter found,so quit.
.DA #$65 .DA #$65
.DA quitparm .DA quitparm
badlod ldy ierlen center the error message badatinit ldy #6
lda #$27
sec
sbc ierlen
lsr
adc ierlen
tax
H24FA lda iomess,y
sta vline16,x
dex
dey
bpl H24FA
bra *
toolong ldy #lgmess.len .1 lda atinitname,y
sta pbuf,y
H2508 lda lgmess,y
sta vline16+5,y
dey dey
bpl H2508 bpl .1
badlod ldx #ILDR.MSG.SYSLOADERR-ILDR.MSG
.HS 2C BIT ABS
toolong ldx #ILDR.MSG.SYSTOOLARG-ILDR.MSG
jsr ILDR.PrintX
ldy #0
.1 iny
lda pbuf,y
jsr COUT
cpy pbuf
bne .1
bra * bra *
*-------------------------------------- *--------------------------------------
ATINIT.ERR .AS -"Unable to load ATInit file" ILDR.PrintX bit RROMBNK2
ATINIT.ERR.LEN .EQ *-ATINIT.ERR lda INVFLG
pha
jsr SETINV
.1 lda ILDR.MSG,x
pha
ora #$80
jsr COUT
inx
pla
bpl .1
lda #$A0
jsr COUT
pla
sta INVFLG
rts
*--------------------------------------
ILDR.MSG .EQ *
ILDR.MSG.SYSLOADERR .AT "Unable to load"
ILDR.MSG.SYSTOOLARG .AT "Too Large"
*--------------------------------------
gfi_list .DA #$0A gfi_list .DA #$0A
.DA atinitname .DA atinitname
.HS 00 .HS 00
gfi_type .HS 00000000 gfi_type .HS 00000000
.HS 0000000000000000 .HS 0000000000000000
.HS 0000 .HS 0000
*--------------------------------------
atopen .HS 03 atopen .HS 03
.DA atinitname .DA atinitname
.DA iobuf i/o buffer .DA iobuf i/o buffer
.HS 01 ref# hard coded since no other files .HS 01 ref# hard coded since no other files
atinitname .DA #06 length of name
.AS -"atinit" name of appletalk config file
*-------------------------------------- *--------------------------------------
lgmess .AS -"** System program too large **" atinitname .DA #06 length of name
lgmess.len .EQ *-lgmess .AS "ATINIT" name of appletalk config file
iomess .AS -"** Unable to load" *--------------------------------------
.AS -" X.System *********"
ierlen .HS 00
opparm .HS 03 opparm .HS 03
.DA pbuf .DA pbuf
.DA iobuf .DA iobuf
@ -194,10 +225,10 @@ quitparm .HS 04
.HS 0000 .HS 0000
.HS 00 .HS 00
.HS 0000 .HS 0000
iterp .AS -".SYSTEM" interpreter suffix that is required iterp .AS ".SYSTEM" interpreter suffix that is required
*-------------------------------------- *--------------------------------------
ILDR.LEN .EQ *-ILDR.START ILDR.LEN .EQ *-ILDR.START
MAN MAN
SAVE USR/SRC/PRODOS.FX/PRODOS.S.ILDR SAVE usr/src/prodos.fx/prodos.s.ildr
LOAD USR/SRC/PRODOS.FX/PRODOS.S LOAD usr/src/prodos.fx/prodos.s
ASM ASM

View File

@ -42,11 +42,22 @@ prostart lda unitnum
sta CLR80DISP sta CLR80DISP
sta CLR80STORE sta CLR80STORE
jsr init jsr init
jsr setvid jsr setvid
jsr setkbd jsr setkbd
jsr home
jsr LDR.ScrInit lda #32
ldx #39
.1 sta $400,x
dex
bpl .1
ldx #LDR.MSG.PRODOS
jsr LDR.PrintX
sec sec
jsr idroutine returns system info jsr idroutine returns system info
@ -130,18 +141,12 @@ LDR.UNSUPP.HW ldx #LDR.MSG.UNSUPP
*-------------------------------------- *--------------------------------------
m128k sta idapple Save MACHID in temp location m128k sta idapple Save MACHID in temp location
lda #$8C Reset 80 col screen ($0C:HOME)
jsr $C300
sta SETALTCHAR
lda #$20 "PRODOS" -> "ProDOS" lda #$20 "PRODOS" -> "ProDOS"
tsb LDR.MSG.PRODOS+1 tsb LDR.MSG.PRODOS+1
tsb LDR.MSG.PRODOS+2 tsb LDR.MSG.PRODOS+2
jsr LDR.ScrInit sec
jsr LDR.ScrInit80
sta CLRC3ROM
ldx #$F ldx #$F
@ -534,9 +539,9 @@ LDR.BlkDevScan stz idxl
bne .2 branch if 16 sector disk II. bne .2 branch if 16 sector disk II.
sta devid =0 since disk ii's have null attributes sta devid =0 since disk ii's have null attributes
lda #RWTS lda #XRW.START
sta LDR.driveradr sta LDR.driveradr
lda /RWTS lda /XRW.START
sta LDR.driveradr+1 sta LDR.driveradr+1
sec 2 devices sec 2 devices
jsr LDR.AddBlkDevs jsr LDR.AddBlkDevs
@ -850,9 +855,135 @@ LDR.SetDevID ldy #$FE check attributes byte.
sta devid sta devid
rts rts
*-------------------------------------- *--------------------------------------
LDR.ScrInit jsr setnorm LDR.ScrInit80 sta CLRC3ROM
lda #$8C Reset 80 col screen ($0C:HOME)
jsr $C300
jsr setnorm
jsr home jsr home
jsr SETINV jsr SETINV
.DO LOGO
lda #20
sta CV
lda #LOGO.PAKED
sta ZPInBufPtr
lda /LOGO.PAKED
sta ZPInBufPtr+1
lda #$00
sta ZPOutBufPtr
lda #$A0
sta ZPOutBufPtr+1
jsr X.Unpak
sta CLRHIRES
sta SETMIXED
bit RDIOUDIS
sta SETIOUDIS
sta SETDHIRES
bmi .10
sta CLRIOUDIS
.10 sta CLRTEXT
lda #$00
sta ZPPtr1
lda #$A0
sta ZPPtr1+1
lda #0
.1 pha
jsr GBSCALC
ldy #0
.2 lda (ZPPtr1),y
pha
and #$f
tax
lda PALETTE.AUX,x
sta SETPAGE2
sta (GBASL),y
pla
lsr
lsr
lsr
lsr
tax
lda PALETTE.MAIN,x
sta CLRPAGE2
sta (GBASL),y
iny
cpy #40
bne .2
lda ZPPtr1
clc
adc #40
sta ZPPtr1
bcc .3
inc ZPPtr1+1
.3 ldy #0
.4 lda (ZPPtr1),y
pha
and #$f
tax
lda PALETTE.AUX,x
asl
asl
asl
asl
sta SETPAGE2
ora (GBASL),y
sta (GBASL),y
pla
lsr
lsr
lsr
lsr
tax
lda PALETTE.MAIN,x
asl
asl
asl
asl
sta CLRPAGE2
ora (GBASL),y
sta (GBASL),y
iny
cpy #40
bne .4
lda ZPPtr1
clc
adc #40
sta ZPPtr1
bcc .7
inc ZPPtr1+1
.7 pla
inc
cmp #20
bne .1
.FIN
jsr CLREOL jsr CLREOL
jsr setnorm jsr setnorm
@ -878,6 +1009,11 @@ LDR.PrintX bit RROMBNK2
sta INVFLG sta INVFLG
rts rts
*-------------------------------------- *--------------------------------------
PALETTE.MAIN .HS 00.02.04.06.08.0A.0C.0E
.HS 01.03.05.07.09.0B.0D.0F
PALETTE.AUX .HS 00.01.02.03.04.05.06.07
.HS 08.09.0A.0B.0C.0D.0E.0F
*--------------------------------------
* 16 bytes moved to $03F0 vectors * 16 bytes moved to $03F0 vectors
*-------------------------------------- *--------------------------------------
LDR.3F0 .DA breakv LDR.3F0 .DA breakv

View File

@ -0,0 +1,40 @@
NEW
AUTO 3,1
*--------------------------------------
LOGO.PAKED .HS da.40.06.20.00.22.20.ff.62.dd
.HS 11.26.02.0f.cc.f0.fb.27.66.0b.0d.77.88.b0.bf.01
.HS 08.10.5f.af.b5.d0.05.0c.0e.2b.84.21.0f.04.01.e0
.HS e0.fc.34.4f.8c.95.f2.33.fe.46.7f.c8.cf.f9.19.ff
.HS 23.3f.e4.67.fc.8c.ff.91.1e.8c.63.18.c7.0f.1a.27
.HS e2.e0.fc.1c.17.94.03.8f.92.90.db.6d.af.e4.40.3c
.HS 24.07.8f.00.c3.ca.02.7a.88.b9.46.9e.4c.03.ca.40
.HS 61.0f.0a.03.7f.11.00.ee.ee.f1.80.0e.0f.06.05.e9
.HS c2.3c.98.1f.94.00.95.36.8f.94.00.8e.1e.44.0f.ca
.HS 05.cb.c8.c0.fb.30.1b.fa.70.08.c6.91.97.94.15.bf
.HS c5.82.95.fe.70.06.10.a7.e0.01.cb.b7.c6.40.30.3c
.HS 18.17.94.06.a5.fe.c0.1f.d3.80.fc.a0.3e.1e.0b.2c
.HS b2.cb.c1.00.79.40.cf.11.4b.4f.09.43.e5.00.21.e5
.HS 01.7c.55.67.94.05.f0.90.5e.6e.0a.b5.ad.6b.5e.08
.HS 43.39.cf.78.43.49.f2.42.1c.3e.0a.07.cb.c0.c3.d6
.HS 11.52.fe.0a.03.c8.c0.f9.e8.2f.28.01.3f.05.03.3c
.HS 78.fc.14.07.99.80.fe.50.1f.ac.13.c2.00.d7.82.bd
.HS 7c.1d.7e.a4.03.3e.8e.a9.ef.a7.49.57.4e.4c.fa.21
.HS c7.8f.90.05.f2.81.15.f7.d0.59.e3.0d.31.f4.80.0a
.HS 09.e7.ee.c0.25.f2.68.7c.a0.1f.84.03.e2.e6.e2.e6
.HS f0.50.08.0e.2f.28.00.f5.c6.7d.90.28.4f.de.00.0b
.HS e2.67.f6.b4.3e.9e.0b.ca.03.78.28.0f.08.01.e5.01
.HS fe.98.07.0f.ef.24.fc.e0.5e.50.3b.de.01.71.cf.c5
.HS 80.70.eb.af.d8.a0.f6.c4.71.a7.94.01.b7.2d.bc.14
.HS 0f.3d.bf.20.1f.27.e4.01.de.1d.5d.f2.f0.d4.3e.3a
.HS 8f.ca.04.5a.d6.f1.85.86.0f.6b.49.ee.a0.3c.a0.3f
.HS 3d.ad.cb.ed.0a.34.9f.4c.b5.fe.d0.9e.ae.02.9f.2e
.HS 8f.c3.f9.eb.e7.89.fc.c2.07.9b.77.f4.f0.be.50.07
.HS d2.52.79.38.f9.79.da.3f.c6.05.ea.00.7d.3c.af.ac
.HS c5.84.bd.c3.37.a7.9a.fd.4f.92.f2.73.fe.50.0f.c1
.HS db.79.e1.ff.23.3f.e4.67.fc.8c.ff.91.9f.f2.33.fe
.HS 3c.6a.00
*--------------------------------------
MAN
SAVE usr/src/prodos.fx/prodos.s.logo
LOAD usr/src/prodos.fx/prodos.s
ASM

View File

@ -86,6 +86,6 @@ DS1216E.DATA .BS 8 Reverted YY MM DD Day HH mm SS CS
NCLK.LEN .EQ *-NCLK.START NCLK.LEN .EQ *-NCLK.START
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.FX/PRODOS.S.NCLK SAVE usr/src/prodos.fx/prodos.s.nclk
LOAD USR/SRC/PRODOS.FX/PRODOS.S LOAD usr/src/prodos.fx/prodos.s
ASM ASM

View File

@ -212,7 +212,7 @@ L5E61 sta gp_cnt
sta wndlft sta wndlft
lda #$16 lda #$16
sta wndwdth sta wndwdth
sta wndbtm sta wndbot
L5E6F jsr nameprnt output filename to screen L5E6F jsr nameprnt output filename to screen
inc valcnt inc valcnt
dec gp_cnt file counter. dec gp_cnt file counter.
@ -451,6 +451,6 @@ dhdr_len .BS 1 directory header length (actually uses 2 bytes)
*-------------------------------------- *--------------------------------------
SEL1.LEN .EQ *-SEL1.START SEL1.LEN .EQ *-SEL1.START
MAN MAN
SAVE USR/SRC/PRODOS.FX/PRODOS.S.SEL1 SAVE usr/src/prodos.fx/prodos.s.sel1
LOAD USR/SRC/PRODOS.FX/PRODOS.S LOAD usr/src/prodos.fx/prodos.s
ASM ASM

View File

@ -1,7 +1,7 @@
NEW NEW
AUTO 3,1 AUTO 3,1
*-------------------------------------- *--------------------------------------
XRWDBG .EQ 0 XRWDBG .EQ 1
*-------------------------------------- *--------------------------------------
XRW.START cld $D8 to flag language card bank 1 (main) XRW.START cld $D8 to flag language card bank 1 (main)
@ -205,7 +205,7 @@ regrwts ldy #1
sta XRW.D2VolNum-1,y sta XRW.D2VolNum-1,y
jsr XRW.Seek jsr XRW.Seek
bra .1 bra .2
.4 cmp XRW.ReqTrack .4 cmp XRW.ReqTrack
beq .5 beq .5
@ -222,7 +222,7 @@ regrwts ldy #1
.41 lda XRW.ReqTrack .41 lda XRW.ReqTrack
jsr XRW.Seek jsr XRW.Seek
bra .1 bra .2
.5 lda XRW.AddrField.S is this the right sector ? .5 lda XRW.AddrField.S is this the right sector ?
cmp XRW.ReqSector cmp XRW.ReqSector

View File

@ -9,6 +9,7 @@ READCAT .EQ 0 Boot Block read Catalog at $C00
ENHFILENAME .EQ 1 ENHFILENAME .EQ 1
LOWERCASE .EQ 1 LOWERCASE .EQ 1
ACL .EQ 1 ACL .EQ 1
LOGO .EQ 1
*-------------------------------------- *--------------------------------------
.INB inc/zp.i .INB inc/zp.i
.INB inc/io.i .INB inc/io.i
@ -65,9 +66,7 @@ dst .EQ $14
cnt .EQ $16 cnt .EQ $16
cde .EQ $18 cde .EQ $18
ecde .EQ $1A ecde .EQ $1A
*--------------------------------------
wndbtm .EQ $23
pcl .EQ $3A pcl .EQ $3A
pch .EQ $3B pch .EQ $3B
A1L .EQ $3C A1L .EQ $3C
@ -115,10 +114,9 @@ pbuf .EQ $0280 prefix buffer
softev .EQ $03F2 RESET vector softev .EQ $03F2 RESET vector
pwredup .EQ $03F4 power up byte pwredup .EQ $03F4 power up byte
nmivect .EQ $03FB nmi handler nmivect .EQ $03FB nmi handler
vmode .EQ $04FB video firmware operating mode
vmode .EQ $04FB video firmware operating mode
ch80col .EQ $057B 80 column ch position ch80col .EQ $057B 80 column ch position
vline16 .EQ $07A8 line 16 of display
dbuf .EQ $0C00 8 page directory buffer dbuf .EQ $0C00 8 page directory buffer
vblock1 .EQ $0E00 ramdisk directory block vblock1 .EQ $0E00 ramdisk directory block
@ -130,8 +128,6 @@ sysentry .EQ $2000 .SYS file load address
xfer .EQ $C314 xfer .EQ $C314
rwts .EQ $D000 disk ii driver in bank 1
pathbuf .EQ $D700 pathbuf .EQ $D700
XDOS.ClockDrv .EQ $D742 XDOS.ClockDrv .EQ $D742
prefixbuf .EQ $D742+125 prefixbuf .EQ $D742+125
@ -198,6 +194,9 @@ X.Unpak.XatYA sty ZPOutBufPtr
lda PAKME.Table+1,x lda PAKME.Table+1,x
sta ZPInBufPtr+1 sta ZPInBufPtr+1
.INB usr/src/shared/x.unpak.s .INB usr/src/shared/x.unpak.s
.DO LOGO
.INB usr/src/prodos.fx/prodos.s.logo
.FIN
*-------------------------------------- *--------------------------------------
PAKME.Table PAKME.Table
PAKME.ILDR .DA ILDR.PAK PAKME.ILDR .DA ILDR.PAK

View File

@ -5,7 +5,7 @@ NEW
.OR $2000 .OR $2000
.TF sbin/initd .TF sbin/initd
*--------------------------------------- *---------------------------------------
INITDDBG .EQ 1 INITDDBG .EQ 0
*-------------------------------------- *--------------------------------------
.INB inc/macros.i .INB inc/macros.i
.INB inc/a2osx.i .INB inc/a2osx.i

BIN
_Pics/ProDOS.logo.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB