mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-29 17:50:18 +00:00
Kernel 0.93+
This commit is contained in:
parent
4847fff6a1
commit
afbd04d4b5
Binary file not shown.
Binary file not shown.
@ -76,7 +76,9 @@ prostart lda unitnum
|
||||
lda auxsp
|
||||
bne LDR.UNSUPP.HW NO 128k
|
||||
|
||||
LDR.CheckROM lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80
|
||||
LDR.CheckROM stz cortland
|
||||
|
||||
lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80
|
||||
|
||||
ldx $FBB3 check hardware id
|
||||
cpx #$06 apple //e?
|
||||
@ -203,6 +205,34 @@ m128k sta idapple Save MACHID in temp location
|
||||
sta ZPOutBufPtr+1
|
||||
jsr X.Unpak
|
||||
|
||||
LDR.IRQ lda RROMWRAMBNK2
|
||||
ldy irqv interrupt vector
|
||||
ldx irqv+1 x = high byte
|
||||
|
||||
jsr lc1in set language card bank 1 to r/w
|
||||
|
||||
sta SETALTZP
|
||||
stx irqv+1 interrupt vector
|
||||
sty irqv save irq vector in aux lc
|
||||
|
||||
sta CLRALTZP
|
||||
stx irqv+1 save irq vector in main lc
|
||||
sty irqv
|
||||
|
||||
lda LDR.MLIOL.P+1 place boot devnum in globals
|
||||
sta LDR.MLIRB.P+1
|
||||
sta devnum last device used
|
||||
|
||||
jsr LDR.BlkDevScan finish setting up globals
|
||||
|
||||
lda LDR.MLIRB.P+1
|
||||
sta devnum
|
||||
|
||||
lda #calldisp
|
||||
sta jspare+1 P8 system death vector
|
||||
lda /calldisp
|
||||
sta jspare+2
|
||||
|
||||
lda kversion
|
||||
sta xdosver save current version for dir use
|
||||
|
||||
@ -355,34 +385,6 @@ RAMDRV.Install jsr lc1in
|
||||
lda #$BF unit num of /RAM
|
||||
sta devlist,x
|
||||
|
||||
LDR.IRQ lda RROMWRAMBNK2
|
||||
ldy irqv interrupt vector
|
||||
ldx irqv+1 x = high byte
|
||||
|
||||
jsr lc1in set language card bank 1 to r/w
|
||||
|
||||
sta SETALTZP
|
||||
stx irqv+1 interrupt vector
|
||||
sty irqv save irq vector in aux lc
|
||||
|
||||
sta CLRALTZP
|
||||
stx irqv+1 save irq vector in main lc
|
||||
sty irqv
|
||||
|
||||
lda LDR.MLIOL.P+1 place boot devnum in globals
|
||||
sta LDR.MLIRB.P+1
|
||||
sta devnum last device used
|
||||
|
||||
jsr LDR.BlkDevScan finish setting up globals
|
||||
|
||||
lda LDR.MLIRB.P+1
|
||||
sta devnum
|
||||
|
||||
lda #calldisp
|
||||
sta jspare+1 P8 system death vector
|
||||
lda /calldisp
|
||||
sta jspare+2
|
||||
|
||||
lda LDR.BootFlag get setup entry point flag
|
||||
beq LDR.ReadRoot taken if normal boot.
|
||||
lda RROMBNK2
|
||||
|
@ -7,8 +7,9 @@ SEL1.START
|
||||
birdbye cld
|
||||
lda RROMBNK2 read ROM
|
||||
stz softev
|
||||
lda /dispadr set reset vector to 'dispadr'
|
||||
sta softev+1 jsr setpwrc create power-up byte
|
||||
lda #$10 set reset vector to 'dispadr'
|
||||
sta softev+1
|
||||
jsr setpwrc create power-up byte
|
||||
lda #$A0
|
||||
jsr $C300 initialize 80 column text card
|
||||
ldx #$17
|
||||
@ -44,15 +45,17 @@ L5D3F dex decrement list pointer and restore.
|
||||
|
||||
volname sta ol_unit store unit number for online.
|
||||
jsr MLI
|
||||
.DA #$C5 online call
|
||||
.DA #MLIONLINE
|
||||
.DA ol_parms
|
||||
bcs ds2 error check.
|
||||
|
||||
stz dlevel haven't read root directory yet.
|
||||
lda pbuf+1 load description byte.
|
||||
and #$0F mask for name length.
|
||||
beq ds2 if 0, then try next unit.
|
||||
adc #$02 add 2 to length.
|
||||
tax name length in x.
|
||||
|
||||
vnam1 stx pbuf save the name length
|
||||
lda #$2F '/'
|
||||
sta pbuf+1 slash before and
|
||||
@ -62,15 +65,17 @@ vnam1 stx pbuf save the name length
|
||||
* open and read directory
|
||||
|
||||
jsr MLI
|
||||
.DA #$C8 open
|
||||
.DA #MLIOPEN
|
||||
.DA op_parms
|
||||
bcc L5D7F good open.
|
||||
|
||||
lda dlevel trying to open root directory ?
|
||||
beq ds2 yes, just move to next volume.
|
||||
jsr bell1 no, generate bell tone
|
||||
jsr popdir and stay at same level.
|
||||
stx pbuf
|
||||
jmp keyloop
|
||||
|
||||
L5D7F inc dlevel
|
||||
stz filecount zero file count.
|
||||
lda op_refn get file reference number
|
||||
@ -81,11 +86,14 @@ L5D7F inc dlevel
|
||||
stz dhdr_len+1
|
||||
jsr doread read directory
|
||||
bcs L5DB3
|
||||
|
||||
ldx #$03
|
||||
|
||||
L5D9A lda sysentry+$23,x copy directory info
|
||||
sta entlen,x to zero page.
|
||||
dex
|
||||
bpl L5D9A
|
||||
|
||||
sta dhdr_len put entry length in read parm list.
|
||||
lda #$01 set block file counter to 1.
|
||||
sta blkfl
|
||||
@ -95,8 +103,10 @@ L5D9A lda sysentry+$23,x copy directory info
|
||||
ora filecnt+1
|
||||
bne L5DB5 if so, continue
|
||||
L5DB3 bra L5E29 else go close directory file.
|
||||
|
||||
L5DB5 bit filecnt+1 check msb of file count.
|
||||
bmi L5DB3 if set then done.
|
||||
|
||||
L5DB9 lda fpos_mid get mid byte of setmark file position.
|
||||
and #$FE reset lsb
|
||||
sta fpos_mid and save.
|
||||
@ -115,18 +125,22 @@ L5DCC inc fpos_mid
|
||||
L5DCE dey decrement file block counter
|
||||
clc
|
||||
bmi L5DD8
|
||||
|
||||
adc entlen add entry length to acc.
|
||||
bcc L5DCE determine if we flopped into 2nd half of
|
||||
bcs L5DCC block, if so inc mid byte position.
|
||||
|
||||
L5DD8 adc #$04 add 4 and put in
|
||||
sta fpos_lo low byte of setmark.
|
||||
jsr MLI call mli
|
||||
.DA #$CE set mark
|
||||
.DA #MLISETMARK
|
||||
.DA #smparms parameters address = $0060
|
||||
.HS 00
|
||||
bcs L5DB3 error
|
||||
|
||||
jsr doread
|
||||
bcs L5DB3 error.
|
||||
|
||||
inc blkfl increase count of files read.
|
||||
lda sysentry file type/length.
|
||||
and #$F0 mask off high nibble.
|
||||
@ -134,6 +148,7 @@ L5DD8 adc #$04 add 4 and put in
|
||||
dec filecnt decrement low file count.
|
||||
bne L5DF8
|
||||
dec filecnt+1 and high if necessary.
|
||||
|
||||
L5DF8 ror sysentry+$1E check access bit.
|
||||
bcc L5DB5 if no read, try next file.
|
||||
lda sysentry+$10 get file type.
|
||||
@ -141,26 +156,32 @@ L5DF8 ror sysentry+$1E check access bit.
|
||||
beq L5E08 then continue.
|
||||
cmp #$FF system file ?
|
||||
bne L5DB5 no, read next file.
|
||||
|
||||
L5E08 ldx filecount get valid files read.
|
||||
cpx #$80 if greater than size of filename buffer
|
||||
bcs L5E29 then close directory
|
||||
sta filetyps,x else store filetype in zero page
|
||||
jsr namecalc and go set up storage area.
|
||||
ldy #$0F
|
||||
|
||||
L5E15 lda sysentry,y get byte of filename
|
||||
sta (fnstore),y store in directed area
|
||||
dey
|
||||
bpl L5E15
|
||||
|
||||
iny y = 0
|
||||
and #$0F mask off low nibble (name length)
|
||||
sta (fnstore),y restore in name buffer
|
||||
inc filecount increment valid file counter
|
||||
bne L5DB5 get next file (branch always)
|
||||
|
||||
L5E26 jmp ds2 error. try next unit.
|
||||
|
||||
L5E29 jsr MLI close directory file
|
||||
.DA #$CC
|
||||
.DA #MLICLOSE
|
||||
.DA cl_parms
|
||||
bcs L5E26 error.
|
||||
|
||||
jsr settxt use full screen for windows
|
||||
jsr home
|
||||
lda #$17 cursor at bottom of screen.
|
||||
@ -169,12 +190,15 @@ L5E29 jsr MLI close directory file
|
||||
lda #$14 horizontal position.
|
||||
jsr sethorz print message.
|
||||
jsr homecurs cursor to upper/left.
|
||||
|
||||
ldx #$00
|
||||
|
||||
L5E48 lda pbuf+1,x
|
||||
beq showfiles
|
||||
jsr output
|
||||
inx
|
||||
bne L5E48
|
||||
|
||||
showfiles stz valcnt
|
||||
stz topname init top filename index.
|
||||
lda filecount # of valid files.
|
||||
@ -241,46 +265,60 @@ L5ECB cmp #$89 tab ?
|
||||
jsr popdir
|
||||
dec dlevel
|
||||
bra L5EF1
|
||||
|
||||
popdir ldx pbuf
|
||||
|
||||
L5EDD dex
|
||||
lda pbuf,x
|
||||
cmp #$2F slash
|
||||
bne L5EDD
|
||||
|
||||
cpx #$01
|
||||
bne L5EEC
|
||||
|
||||
ldx pbuf
|
||||
L5EEC rts
|
||||
|
||||
L5EED jmp ds2 set up new unit number.
|
||||
|
||||
L5EF0 inx
|
||||
|
||||
L5EF1 jmp vnam1 get new directory info.
|
||||
|
||||
* run selected file
|
||||
|
||||
L5EF4 jsr MLI set prefix
|
||||
.DA #$C6
|
||||
L5EF4 jsr MLI
|
||||
.DA #MLISETPREFIX
|
||||
.DA pf_parms
|
||||
bcs L5EED error.
|
||||
|
||||
ldx valcnt get name number.
|
||||
jsr namecalc set up name storage area (on return y=0)
|
||||
|
||||
ldx pbuf get prefix length.
|
||||
|
||||
L5F04 iny start at y = 1.
|
||||
lda (fnstore),y get character of name.
|
||||
inx
|
||||
sta pbuf,x store in prefix buffer.
|
||||
cpy namelen check length of name.
|
||||
bcc L5F04 loop until all transferred.
|
||||
|
||||
stx pbuf put prefix length into buffer.
|
||||
ldy valcnt get file number.
|
||||
lda filetyps,y get file type.
|
||||
bpl L5EF0 branch if directory.
|
||||
|
||||
jsr settxt reset to full window.
|
||||
jsr home makes for no flash.
|
||||
lda #$95 ctrl-u
|
||||
jsr cout turn off 80 columns.
|
||||
|
||||
jsr MLI open file
|
||||
.DA #$C8
|
||||
.DA #MLIOPEN
|
||||
.DA op_parms
|
||||
bcs L5EED if error.
|
||||
|
||||
lda op_refn move reference number
|
||||
sta rd_refn for read.
|
||||
lda #$FF read the entire file.
|
||||
@ -289,7 +327,7 @@ L5F04 iny start at y = 1.
|
||||
jsr doread read selected file.
|
||||
php save possible error.
|
||||
jsr MLI close file. ignore any error from close
|
||||
.DA #$CC
|
||||
.DA #MLICLOSE
|
||||
.DA cl_parms
|
||||
plp restore status from read.
|
||||
bcs L5EED if any errors.
|
||||
@ -348,20 +386,25 @@ nameprnt lda #$02
|
||||
jsr msgout display the folder.
|
||||
pla restore inverse setting.
|
||||
sta invflg
|
||||
|
||||
L5F99 jsr outsp output a space.
|
||||
jsr namecalc calc name location.
|
||||
|
||||
L5F9F iny y = 1 (first time).
|
||||
lda (fnstore),y get name character.
|
||||
jsr output put on screen.
|
||||
cpy namelen end of name ?
|
||||
bcc L5F9F no.
|
||||
|
||||
outsp lda #$A0
|
||||
bne L5FB1 branch always.
|
||||
|
||||
homecurs lda #$99
|
||||
output ora #$80 set high bit.
|
||||
L5FB1 jmp cout output to screen.
|
||||
|
||||
doread jsr MLI mli read call
|
||||
.DA #$CA
|
||||
.DA #MLIREAD
|
||||
.DA rd_parms
|
||||
rts
|
||||
|
||||
@ -370,23 +413,29 @@ doread jsr MLI mli read call
|
||||
dsp2msg .AS -"RETURN: Select | TAB: Chg Vol | "
|
||||
.AS -"ESC: Back"
|
||||
.DA #$00
|
||||
|
||||
fldrmsg .DA #$0F inverse control code
|
||||
.HS 1B enable mousetext
|
||||
.AS -"XY" folder characters
|
||||
.HS 18 disable mousetext
|
||||
.HS 0E normal control code
|
||||
.HS 00
|
||||
|
||||
op_parms .DA #$03 3 parms
|
||||
.DA pbuf pathname
|
||||
.DA op_buf file buffer
|
||||
op_refn .HS 00 reference number
|
||||
|
||||
cl_parms .HS 01 1 parm
|
||||
.HS 00 reference number.
|
||||
|
||||
ol_parms .HS 02 2 parms
|
||||
ol_unit .HS 60 unit number, default = s6, d1
|
||||
.DA pbuf+1 data buffer
|
||||
|
||||
pf_parms .DA #01 one parm
|
||||
.DA pbuf pathname
|
||||
|
||||
rd_parms .DA #04 4 parms
|
||||
rd_refn .HS 01 reference number
|
||||
.DA sysentry data buffer
|
||||
@ -394,10 +443,11 @@ rd_refn .HS 01 reference number
|
||||
* these last 2 parms (4 bytes) may extend past $300 length limit since
|
||||
* the request count is set prior to using the parm block and the transfer
|
||||
* count isn't used at all (except by prodos)
|
||||
* .HS 0000 requested length
|
||||
* .HS 0000 actual length
|
||||
|
||||
dhdr_len .HS 00 directory header length (actually uses 2 bytes)
|
||||
.DUMMY
|
||||
.BS 2 requested length
|
||||
.BS 2 actual length
|
||||
dhdr_len .BS 1 directory header length (actually uses 2 bytes)
|
||||
.ED
|
||||
*--------------------------------------
|
||||
SEL1.LEN .EQ *-SEL1.START
|
||||
MAN
|
||||
|
@ -493,33 +493,40 @@ L4EC7 rts
|
||||
|
||||
calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||
lda RRAMWRAMBNK2
|
||||
lda /dispadr
|
||||
sta A2L+1
|
||||
lda #dispadr
|
||||
sta A2L
|
||||
lda /displc2
|
||||
sta A1L+1
|
||||
|
||||
stz A1L
|
||||
lda #$D1
|
||||
sta A1L+1
|
||||
|
||||
stz A2L
|
||||
lda #$10
|
||||
sta A2L+1
|
||||
|
||||
ldy #$00
|
||||
ldx #$03 3 pages to move.
|
||||
L4EE0 dey move a page of code.
|
||||
lda (A1L),y
|
||||
|
||||
.1 lda (A1L),y
|
||||
sta (A2L),y
|
||||
tya
|
||||
bne L4EE0
|
||||
iny
|
||||
bne .1
|
||||
|
||||
inc A1L+1 pointers to next page
|
||||
inc A2L+1
|
||||
dex move all pages needed
|
||||
bne L4EE0
|
||||
bne .1
|
||||
|
||||
lda RRAMWRAMBNK1 read/write RAM bank 1
|
||||
lda RRAMWRAMBNK1 swap mli space back in
|
||||
|
||||
stz mliact MLI active flag
|
||||
|
||||
stz softev
|
||||
lda /dispadr point RESET to dispatch entry
|
||||
lda #$10 point RESET to dispatch entry
|
||||
sta softev+1
|
||||
eor #$A5
|
||||
sta pwredup power up byte
|
||||
jmp dispadr
|
||||
|
||||
jmp $1000
|
||||
|
||||
* translate a prodos call into a smartport call
|
||||
* to access unseen smartport devices
|
||||
|
@ -126,7 +126,6 @@ vline24 .EQ $07D0 line 24 of display
|
||||
dbuf .EQ $0C00 8 page directory buffer
|
||||
vblock1 .EQ $0E00 ramdisk directory block
|
||||
volbuf .EQ $0F00 volume buffer
|
||||
dispadr .EQ $1000
|
||||
iobuf .EQ $1400 i/o buffer
|
||||
fbuf .EQ $1800 FCB buffer
|
||||
op_buf .EQ $1C00 open file buffer (selector)
|
||||
@ -145,7 +144,6 @@ auxmove .EQ $C311 move (3C)-(3E) to (42)
|
||||
xfer .EQ $C314
|
||||
|
||||
rwts .EQ $D000 disk ii driver in bank 1
|
||||
displc2 .EQ $D100 system death routine stored in bank 2
|
||||
pathbuf .EQ $D700 pathname buffer
|
||||
tclk_in .EQ $D742 clock driver in bank 2
|
||||
fcbbuf .EQ $D800 fcb buffer
|
||||
|
Loading…
Reference in New Issue
Block a user