diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 408d9eb9..697075a8 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index a2438e63..41590861 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/SH.S.IO.txt b/BIN/SH.S.IO.txt index 26365c32..7f2433bf 100644 --- a/BIN/SH.S.IO.txt +++ b/BIN/SH.S.IO.txt @@ -51,7 +51,7 @@ IO.Reset.In sec .8 clc rts *-------------------------------------- -IO.Pipe.Out >PUSHEA.G IO.TMPFIFO +IO.Pipe.Out >PUSHEA.G IO.FIFONAME >PUSHWZ mode >SYSCALL MKFIFO bcs .9 @@ -129,7 +129,7 @@ IO.Pipe.OpenR ldx #O.RDONLY+O.TEXT IO.Pipe.OpenW ldx #O.WRONLY+O.TEXT -IO.Pipe.Open >LEA.G IO.TMPFIFO +IO.Pipe.Open >LEA.G IO.FIFONAME *-------------------------------------- IO.FOpenYAX >PUSHYA txa diff --git a/BIN/SH.S.txt b/BIN/SH.S.txt index 9d66cbce..497bc6fa 100644 --- a/BIN/SH.S.txt +++ b/BIN/SH.S.txt @@ -780,7 +780,7 @@ Sleep .BS 4 *M32.BUF .BS 12 -1234567890\0 TimeBuf .EQ * M32.BUF .EQ * -IO.TMPFIFO .BS 12 /tmp/fifoXX\0 +IO.FIFONAME .BS 12 /dev/fifoXX\0 *-------------------------------------- DS.END .ED *-------------------------------------- diff --git a/DRV/DAN2ETH.DRV.S.txt b/DRV/DAN2ETH.DRV.S.txt index 34500c73..5b5797cb 100644 --- a/DRV/DAN2ETH.DRV.S.txt +++ b/DRV/DAN2ETH.DRV.S.txt @@ -149,7 +149,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/DRV/GRAPPLER.DRV.S.txt b/DRV/GRAPPLER.DRV.S.txt index 0f200566..28a97749 100644 --- a/DRV/GRAPPLER.DRV.S.txt +++ b/DRV/GRAPPLER.DRV.S.txt @@ -46,7 +46,7 @@ Dev.Detect >STYA ARGS .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldx #DEVSIG.Length-1 @@ -79,7 +79,7 @@ Dev.Detect >STYA ARGS pha tay lda #A2osX.S.COM - sta A2osX.S,y + sta A2osX.S-1,y pla asl asl diff --git a/DRV/GRAPPLERP.DRV.S.txt b/DRV/GRAPPLERP.DRV.S.txt index 5a416dbd..ea597196 100644 --- a/DRV/GRAPPLERP.DRV.S.txt +++ b/DRV/GRAPPLERP.DRV.S.txt @@ -46,7 +46,7 @@ Dev.Detect >STYA ARGS .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldx #DEVSIG.Length-1 @@ -79,7 +79,7 @@ Dev.Detect >STYA ARGS pha tay lda #A2osX.S.COM - sta A2osX.S,y + sta A2osX.S-1,y pla asl asl diff --git a/DRV/LANCEGS.DRV.S.txt b/DRV/LANCEGS.DRV.S.txt index bdba537f..29446f59 100644 --- a/DRV/LANCEGS.DRV.S.txt +++ b/DRV/LANCEGS.DRV.S.txt @@ -51,7 +51,7 @@ Dev.Detect >STYA ZPArgPtr ldx #$70 ldy #7 -.1 lda A2osX.S,y IO based detection, avoid scanning in Disk Controller IO!!!! +.1 lda A2osX.S-1,y IO based detection, avoid scanning in Disk Controller IO!!!! bne .2 lda L91C96.BSR+1,x @@ -100,7 +100,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/DRV/MKBOARD.DRV.S.txt b/DRV/MKBOARD.DRV.S.txt index 5b2d0f78..18b22d15 100644 --- a/DRV/MKBOARD.DRV.S.txt +++ b/DRV/MKBOARD.DRV.S.txt @@ -42,7 +42,7 @@ Dev.Detect >STYA ARGS .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldy #4 @@ -74,7 +74,7 @@ Dev.Detect >STYA ARGS pha tay lda #A2osX.S.SND - sta A2osX.S,y + sta A2osX.S-1,y pla asl asl diff --git a/DRV/MOUSE.DRV.S.txt b/DRV/MOUSE.DRV.S.txt index 69128ddc..ffd950ea 100644 --- a/DRV/MOUSE.DRV.S.txt +++ b/DRV/MOUSE.DRV.S.txt @@ -73,6 +73,8 @@ Dev.Detect >LDYA L.MSG.DETECT sta GOMOUSE.JMP+2 and #$0F sta DEVSLOT0n + tax + ora #$30 sta FD.DEV.NAME+3 asl @@ -80,6 +82,9 @@ Dev.Detect >LDYA L.MSG.DETECT asl asl sta GOMOUSE.n0+1 + + lda #A2osX.S.XY + sta A2osX.S-1,x >PUSHW L.MSG.DETECT.OK >PUSHW L.FD.DEV.NAME diff --git a/DRV/PIC.DRV.S.txt b/DRV/PIC.DRV.S.txt index 4310841b..f4395cd7 100644 --- a/DRV/PIC.DRV.S.txt +++ b/DRV/PIC.DRV.S.txt @@ -7,6 +7,7 @@ NEW *-------------------------------------- .INB inc/macros.i .INB inc/a2osx.i + .INB inc/kernel.i .INB inc/mli.e.i .INB inc/com.i *-------------------------------------- @@ -46,7 +47,7 @@ Dev.Detect >STYA ARGS .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldx #DEVSIG.Length-1 @@ -79,7 +80,7 @@ Dev.Detect >STYA ARGS pha tay lda #A2osX.S.COM - sta A2osX.S,y + sta A2osX.S-1,y pla asl asl @@ -292,7 +293,7 @@ DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ .PS "Apple // Int Crd" .DA #S.DIB.T.CHAR .DA #0 - .DA #0,#94 + .DA K.VER *-------------------------------------- DCB .DA #S.DCB.T.COM .DA #0 FLAGS diff --git a/DRV/PPPSSC.DRV.S.txt b/DRV/PPPSSC.DRV.S.txt index 11f95f88..0c297367 100644 --- a/DRV/PPPSSC.DRV.S.txt +++ b/DRV/PPPSSC.DRV.S.txt @@ -117,7 +117,7 @@ Dev.Detect >STYA ZPArgsPtr .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldx #DEVSIG.Length-1 @@ -187,7 +187,7 @@ Dev.Detect >STYA ZPArgsPtr and #$0F tax lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc diff --git a/DRV/UTHER2.AI.DRV.S.txt b/DRV/UTHER2.AI.DRV.S.txt index ab710fd2..ec4579cd 100644 --- a/DRV/UTHER2.AI.DRV.S.txt +++ b/DRV/UTHER2.AI.DRV.S.txt @@ -55,7 +55,7 @@ Dev.Detect >STYA ZPArgPtr ldx #$70+$88 ldy #7 -.1 lda A2osX.S,y IO based detection, avoid scanning in Disk Controller IO!!!! +.1 lda A2osX.S-1,y IO based detection, avoid scanning in Disk Controller IO!!!! bne .2 lda #W5100.MR.RST @@ -127,7 +127,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/DRV/UTHERNET.DRV.S.txt b/DRV/UTHERNET.DRV.S.txt index e82b33a0..0085447d 100644 --- a/DRV/UTHERNET.DRV.S.txt +++ b/DRV/UTHERNET.DRV.S.txt @@ -56,7 +56,7 @@ Dev.Detect >STYA ZPArgPtr ldx #$70 ldy #7 -.1 lda A2osX.S,y IO based detection, avoid scanning in Disk Controller IO!!!! +.1 lda A2osX.S-1,y IO based detection, avoid scanning in Disk Controller IO!!!! bne .2 lda /PP.ID @@ -121,7 +121,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/DRV/UTHERNET2.DRV.S.txt b/DRV/UTHERNET2.DRV.S.txt index e0f10b30..5ff14815 100644 --- a/DRV/UTHERNET2.DRV.S.txt +++ b/DRV/UTHERNET2.DRV.S.txt @@ -53,7 +53,7 @@ Dev.Detect >STYA ZPArgPtr ldx #$70+$88 ldy #7 -.1 lda A2osX.S,y IO based detection, avoid scanning in Disk Controller IO!!!! +.1 lda A2osX.S-1,y IO based detection, avoid scanning in Disk Controller IO!!!! bne .2 lda #W5100.MR.RST @@ -125,7 +125,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/INC/A2osX.I.txt b/INC/A2osX.I.txt index e3368f24..bcbaa643 100644 --- a/INC/A2osX.I.txt +++ b/INC/A2osX.I.txt @@ -67,7 +67,7 @@ A2osX.HZ .EQ A2osX.KCONFIG+00 5/6 for 50/60Hz A2osX.TTYDEVS .EQ A2osX.KCONFIG+01 A2osX.F .EQ A2osX.KCONFIG+02 A2osX.F.CHROOT .EQ %10000000 ChRooting to /RAMx -A2osX.F.PMODE .EQ %01000000 Pre-emptive Mode +A2osX.F.PMODE .EQ %01000000 Preemptive Mode * A2osX.S .EQ A2osX.KCONFIG+09 7 slots A2osX.S.Z80 .EQ $80 diff --git a/ProDOS.FX/ProDOS.S.XDOS.A.txt b/ProDOS.FX/ProDOS.S.XDOS.A.txt index 8714463e..e8a34918 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.A.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.A.txt @@ -346,9 +346,9 @@ XDOS.SysDeath tax death error code. .1 sta IO.CLRPAGE2 switch in text page 1. - ldy #deathmsg.LEN-1 + ldy #XDOS.SysErrMsgL-1 -.2 lda deathmsg,y +.2 lda XDOS.SysErrMsg,y sta $400,y 'SYS ERR-$' dey bpl .2 @@ -361,7 +361,7 @@ XDOS.SysDeath tax death error code. adc #$06 inc to alpha a-f -.3 ldy #deathmsg.LEN +.3 ldy #XDOS.SysErrMsgL ora #$80 sta $400,y @@ -381,9 +381,9 @@ XDOS.BFMgr lda XDOS.CmdFlags,x translate into command address. sta cmdtemp and #$3F bit 6 is refnum, 5 is time to process tax - lda cmdtable,x move address to indirect jump + lda XDOS.CmdJmps,x move address to indirect jump sta .8+1 - lda cmdtable+1,x high byte + lda XDOS.CmdJmps+1,x high byte sta .8+2 lda #$20 init backup bit flag @@ -695,10 +695,11 @@ badref lda #MLI.E.BADREF requested refnum is sec illegal (out of range) rts *-------------------------------------- -XDOS.Online jsr mvdbufr figure out how big buffer has to be. +XDOS.Online jsr XDOS.GetUserBuf figure out how big buffer has to be. stz cbytes set this for valdbuf routine. stz cbytes+1 + ldy #$01 lda (ZP.A3L),y if 0 then cbytes=$100 else $010 for one and #$F0 device. mask out unused nibble. diff --git a/ProDOS.FX/ProDOS.S.XDOS.B.txt b/ProDOS.FX/ProDOS.S.XDOS.B.txt index 6912e422..c359c911 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.B.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.B.txt @@ -208,9 +208,9 @@ XDOS.FindFile jsr XDOS.CheckPath see if file exists XDOS.CheckPath jsr XDOS.FindVol bcs fnderr.RTS - bne lookfil0 branch if more than root + bne XDOS.CheckPath1 branch if more than root - jsr XDOS.ZPT.InitGBuf + jsr XDOS.ZPT.InitGBuf zpt = GBUF+4 ldy #$1F move in id and date info @@ -228,6 +228,7 @@ XDOS.CheckPath jsr XDOS.FindVol lda #$D0 fake directory file sta XDOS.DE.Filename + lda XDOS.GBuf+2 check forward link. ora XDOS.GBuf+3 if non-zero, assume full sized directory bne .3 else assume it's the slot 3 /RAM volume @@ -244,7 +245,7 @@ errdir lda #MLI.E.BADDIR directory error fnderr sec fnderr.RTS rts *-------------------------------------- -lookfil0 stz nofree reset free entry indicator. +XDOS.CheckPath1 stz nofree reset free entry indicator. sec dir to be searched has header in this block. @@ -363,7 +364,7 @@ L386C asl .FIN movhead jsr XDOS.GetDH move directory info. - jmp lookfil0 do next local pathname. + jmp XDOS.CheckPath1 do next local pathname. *-------------------------------------- XDOS.GetDH ldx #10 move this directory info diff --git a/ProDOS.FX/ProDOS.S.XDOS.C.txt b/ProDOS.FX/ProDOS.S.XDOS.C.txt index 6476f3dc..4eca0321 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.C.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.C.txt @@ -390,13 +390,13 @@ L3DFD lda #MLI.E.BEYEOF invalid position rts *-------------------------------------- XDOS.SetMark ldy #$04 index to user's desired position. - ldx XDOS.FCBPtr file's control block index. + ldx XDOS.FCBPtr file's control block index. inx inc by 2 for index to hi eof inx sec indicate comparisons are necessary. -.1 lda (ZP.A3L),y move it to 'tpos' - sta tposll-2,y +.1 lda (ZP.A3L),y move it to 'tpos' + sta XDOS.TmpPos-2,y bcc .2 branch if mark < eof cmp XDOS.FCBs+FCB.EOF,x @@ -411,12 +411,12 @@ XDOS.SetMark ldy #$04 index to user's desired position. eor #$01 preserves carry status. bne .1 branch if more. *-------------------------------------- -rdposn ldy XDOS.FCBPtr test to see if new position is +rdposn ldy XDOS.FCBPtr test to see if new position is lda XDOS.FCBs+FCB.MARK+1,y within the same (current) data block. and #$FE sta scrtch - lda tposlh middle byte of new position + lda XDOS.TmpPos+1 middle byte of new position sec sbc scrtch sta scrtch @@ -425,7 +425,7 @@ rdposn ldy XDOS.FCBPtr test to see if new position is cmp #$02 must be within 512 bytes of beginning bcs L3E44 of current position. - lda tposhi make sure within the same 64k. + lda XDOS.TmpPos+2 make sure within the same 64k. cmp XDOS.FCBs+FCB.MARK+2,y bne L3E44 branch if not. @@ -439,8 +439,9 @@ L3E44 lda XDOS.FCBs+FCB.STYPE,y determine file type for positioning. jmp dirmark no, test for dir type. -L3E50 ldy #$A4 clear illegal filetype entry in fcb - sta XDOS.FCBs,y +L3E50 +* ldy #$A4 ??????? clear illegal filetype entry in fcb +* sta XDOS.FCBs,y ??????? WILL TRASH anther FCB lda #MLI.E.BADREF and report error sec rts @@ -459,7 +460,7 @@ L3E6B ldy XDOS.FCBPtr test to see if current index block lda XDOS.FCBs+FCB.MARK+2,y is usable by checking if new and #$FE position is within 128k of the sta scrtch beginning of current sapling level - lda tposhi chunk. + lda XDOS.TmpPos+2 chunk. sec sbc scrtch bcc L3E9D branch if a new index block is needed. @@ -471,9 +472,9 @@ L3E6B ldy XDOS.FCBPtr test to see if current index block dex bne datlevel1 no, use current indexes. -L3E89 lda tposlh is new position < 512 ? +L3E89 lda XDOS.TmpPos+1 is new position < 512 ? lsr - ora tposhi + ora XDOS.TmpPos+2 bne L3EEF no, mark both data and index block as lda XDOS.FCBs+FCB.1stBLK,y unallocated. 1st block is only block @@ -492,7 +493,7 @@ L3EA9 ldx levels be sure there is a top index cpx #$03 before reading it... beq posindex branch if file is a tree. - lda tposhi is new position within range of a + lda XDOS.TmpPos+2 is new position within range of a lsr sapling file (less than 128k) ? php save results lda #$07 (no level is allocated for new pos'n) @@ -517,7 +518,7 @@ posindex jsr XDOS.ClrFCBStatus clr all alloc requirements for previous jsr rfcbfst position. get highest level index block bcs L3ED4 - lda tposhi then test for a sap level index block + lda XDOS.TmpPos+2 then test for a sap level index block lsr tay lda (zpt),y @@ -597,23 +598,23 @@ rnewpos sta ZP.BLKNUM+1 jsr XDOS.ClrFCBStatus show whole chain is allocated. *-------------------------------------- -svmark ldy XDOS.FCBPtr update position in fcb +svmark ldy XDOS.FCBPtr update position in fcb iny iny ldx #$02 -L3F68 lda XDOS.FCBs+FCB.MARK,y save old mark in case calling routine +L3F68 lda XDOS.FCBs+FCB.MARK,y save old mark in case calling routine sta oldmark,x fails later. - lda tposll,x + lda XDOS.TmpPos,x sta XDOS.FCBs+FCB.MARK,y dey dex move 3 byte position marker bpl L3F68 clc set up indirect address to buffer - lda ZP.DataPtr page pointed to by the current + lda ZP.DataPtr page pointed to by the current sta sos position marker. - lda tposlh + lda XDOS.TmpPos+1 and #$01 adc ZP.DataPtr+1 sta sos+1 @@ -630,15 +631,15 @@ L3F9C lda scrtch recover results of previous subtraction. sta cntent blocks must be read to get to new pos'n. lda XDOS.FCBs+FCB.MARK+1,y test for positive direction - cmp tposlh indicated by carry. + cmp XDOS.TmpPos+1 indicated by carry. lda XDOS.FCBs+FCB.MARK+2,y - sbc tposhi + sbc XDOS.TmpPos+2 bcc L3FB9 if set, position forward. otherwise, L3FAB ldy #$00 read directory file in reverse order. - jsr dirpos1 read previous block. + jsr XDOS.DirSeek read previous block. bcs L3FD6 if error. inc cntent count up to 128. @@ -647,7 +648,7 @@ L3FAB ldy #$00 read directory file in reverse order. bmi svmark always. L3FB9 ldy #$02 position is forward from current. - jsr dirpos1 read next directory block + jsr XDOS.DirSeek read next directory block bcs L3FD6 if error. dec cntent @@ -655,22 +656,17 @@ L3FB9 ldy #$02 position is forward from current. beq svmark branch always. *-------------------------------------- -dirpos1 lda (ZP.DataPtr),y get link address of previous or next +XDOS.DirSeek lda (ZP.DataPtr),y get link address of previous or next sta ZP.BLKNUM directory block. - cmp #$01 test for null byte into carry - iny but first be sure there is a link. - lda (ZP.DataPtr),y get the rest of the link. - bne L3FD8 branch if certain link exists. - - bcs L3FD8 was the low part null as well ? + iny + lda (ZP.DataPtr),y get the rest of the link. + sta ZP.BLKNUM+1 + ora ZP.BLKNUM but first be sure there is a link. + bne XDOS.ReadFCB.DBLK branch if certain link exists. lda #MLI.E.EOF something is wrong with directory file! - sec error. - L3FD6 rts - -L3FD8 sta ZP.BLKNUM+1 *-------------------------------------- XDOS.ReadFCB.DBLK lda #$01 read command @@ -690,23 +686,6 @@ XDOS.ReadFCB.DBLK .9 rts *-------------------------------------- -*rfcbidx lda #$01 prepare to read index block : read command -* sta ZP.CMDNUM - -* ldx #zpt address of current index buffer. -* XDOS.FileIOPtrX go read index block. -* bcs L400C error - -* ldy XDOS.FCBPtr -* lda ZP.BLKNUM -* sta XDOS.FCBs+FCB.IBLK,y save block address of this index in fcb -* lda ZP.BLKNUM+1 -* sta XDOS.FCBs+FCB.IBLK+1,y - -** clc - -*L400C rts -*-------------------------------------- wfcbfst jsr XDOS.FlushBM update the bitmap and write file's 1st block. ldx #$02 write command @@ -715,7 +694,7 @@ wfcbfst jsr XDOS.FlushBM update the bitmap and write file's 1st block. rfcbfst ldx #$01 read command. lda #FCB.1stBLK - ora XDOS.FCBPtr add offset to XDOS.FCBPtr + ora XDOS.FCBPtr add offset to XDOS.FCBPtr tay txa get back command @@ -751,8 +730,6 @@ XDOS.FileIO2 sec also, set to indicate reg call made to stz GP.ERROR clear global error code. jmp XDOS.DevCall call the driver. *-------------------------------------- - -*-------------------------------------- XDOS.WriteDBLK ldx #ZP.DataPtr point at memory address with x and lda #FCB.DBLK disk address with y. ora XDOS.FCBPtr add offset to XDOS.FCBPtr @@ -848,7 +825,7 @@ L40FF ldx #$06 move address of 1st block of file, end L4101 sta ZP.BLKNUM+1 of file and current usage count. lda XDOS.FCBPtr - ora ofcbtbl,x this is done via a translation table + ora XDOS.DE2FCB,x this is done via a translation table tay between directory info and fcb. lda XDOS.DE.KeyPtr,x sta XDOS.FCBs,y @@ -877,7 +854,7 @@ L4101 sta ZP.BLKNUM+1 of file and current usage count. ldy #$02 etc. set desired position to 0. lda #$00 -L413C sta tposll,y +L413C sta XDOS.TmpPos,y dey bpl L413C diff --git a/ProDOS.FX/ProDOS.S.XDOS.D.txt b/ProDOS.FX/ProDOS.S.XDOS.D.txt index 98efcf96..e942986b 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.D.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.D.txt @@ -1,10 +1,10 @@ NEW AUTO 3,1 *-------------------------------------- -XDOS.Read jsr mvdbufr xfer buffer address and request count +XDOS.Read jsr XDOS.GetUserBuf xfer buffer address and request count jsr mvcbytes to a more accessable location, also pha get fcb attributes and save on stack. - jsr calcmrk calc mark after read, test if mark > eof + jsr XDOS.CalcNewMark calc mark after read, test if mark > eof pla carry set means end mark > eof. and #$01 test for read enabled. beq .9 @@ -13,11 +13,11 @@ XDOS.Read jsr mvdbufr xfer buffer address and request count ldy XDOS.FCBPtr request to read until just before eof. lda XDOS.FCBs+FCB.EOF,y result = (eof-1) - position - sbc tposll + sbc XDOS.TmpPos sta cbytes sta rwreql lda XDOS.FCBs+FCB.EOF+1,y - sbc tposlh + sbc XDOS.TmpPos+1 sta cbytes+1 sta rwreqh ora cbytes if both bytes = 0 then eof error @@ -74,12 +74,12 @@ L424E inc ZP.DataPtr+1 incll ptrs by one block (512 bytes) inc ZP.DataPtr+1 dec rwreqh dec rwreqh - inc tposlh - inc tposlh + inc XDOS.TmpPos+1 + inc XDOS.TmpPos+1 bne L4269 if pos'n doesn't get to a 64k boundary - inc tposhi otherwise, must check for a 128k one. - lda tposhi carry set if 128k boundary reached. + inc XDOS.TmpPos+2 otherwise, must check for a 128k one. + lda XDOS.TmpPos+2 carry set if 128k boundary reached. eor #$01 lsr @@ -147,7 +147,7 @@ rwdone ldy #$06 return total # of bytes actually read preprw ldy XDOS.FCBPtr adj pointer to user's buffer to make sec the transfer lda ZP.UserBuf - sbc tposll + sbc XDOS.TmpPos sta ZP.UserBuf bcs .1 if no adjustment to hi address needed @@ -162,7 +162,7 @@ preprw ldy XDOS.FCBPtr adj pointer to user's buffer to make lda XDOS.FCBs+FCB.NLBYTE,y move newline character to more sta nlchar accesible spot. -.2 ldy tposll index to 1st data. +.2 ldy XDOS.TmpPos index to 1st data. lda ZP.DataPtr reset low order of position pointer to sta sos beginning of page. ldx rwreql get low order count of requested bytes. @@ -191,10 +191,10 @@ L4319 dex dec # of bytes left to move. lda sos+1 test for end of buffer, but first inc ZP.UserBuf+1 adjust user buffer pointer - inc tposlh and position + inc XDOS.TmpPos+1 and position bne L4329 - inc tposhi + inc XDOS.TmpPos+2 L4329 inc sos+1 and sos buffer high address. eor ZP.DataPtr+1 (carry is undisturbed) @@ -227,14 +227,14 @@ L4350 iny adjust position. bne L435D inc ZP.UserBuf+1 inc pointers - inc tposlh + inc XDOS.TmpPos+1 bne L435D - inc tposhi + inc XDOS.TmpPos+2 L435D bit setvflg (sets v flag) -L4360 sty tposll save low position +L4360 sty XDOS.TmpPos save low position bvs L4366 inx leave request as +1 for next call @@ -304,11 +304,12 @@ mvcbytes ldy #$04 move request count to a more accessable location sta cbytes+1 sta rwreqh ldy XDOS.FCBPtr return y = val(XDOS.FCBPtr), + lda XDOS.FCBs+FCB.ACCESS,y a = attributes - clc and carry clear... +* clc and carry clear... rts *-------------------------------------- -mvdbufr ldy #$02 move the pointer to user's buffer +XDOS.GetUserBuf ldy #$02 move the pointer to user's buffer lda (ZP.A3L),y to the block file manager sta ZP.UserBuf z-page area iny @@ -326,11 +327,14 @@ XDOS.GetFCB.ST ldy XDOS.FCBPtr return storage type * y,x,a is unknown * carry set indicates scrtch > eof *-------------------------------------- -calcmrk ldx #$00 +XDOS.CalcNewMark + ldx #$00 ldy XDOS.FCBPtr + clc -L43EE lda XDOS.FCBs+FCB.MARK,y - sta tposll,x + +.1 lda XDOS.FCBs+FCB.MARK,y + sta XDOS.TmpPos,x sta oldmark,x adc cbytes,x sta scrtch,x @@ -340,18 +344,18 @@ L43EE lda XDOS.FCBs+FCB.MARK,y iny inx - bne L43EE always. - + bne .1 always. +*-------------------------------------- eoftest lda scrtch,x new mark in scrtch. cmp XDOS.FCBs+FCB.EOF,y is new position > eof ? - bcc L4414 no, proceed. - bne L4414 yes, adjust 'cbytes' request + bcc .1 no, proceed. + bne .1 yes, adjust 'cbytes' request dey dex all tree bytes compared ? bpl eoftest no, test next lowest -L4414 rts +.1 rts *-------------------------------------- werreof jsr plus2fcb reset eof to pre-error position. @@ -392,7 +396,7 @@ plus2fcb lda #$02 on exit both a and y = XDOS.FCBPtr+2. *-------------------------------------- XDOS.Write jsr mvcbytes first determine if requested write is legal. pha - jsr calcmrk save a copy of eof to old eof, set/clr + jsr XDOS.CalcNewMark save a copy of eof to old eof, set/clr jsr wadjeof carry to determine if new mark > eof. pla get attributes again. and #$02 is write enabled ? @@ -410,7 +414,7 @@ L4462 jsr XDOS.TestWP otherwise, make sure device is not jmp rwdone else do nothing. -L4472 jsr mvdbufr move the user's buffer ptr to bfm zero +L4472 jsr XDOS.GetUserBuf move the user's buffer ptr to bfm zero cmp #$04 page area, also get storage type. bcs L445E if not tree, return an access error. @@ -498,10 +502,10 @@ L4507 iny page crossed ? lda sos+1 test for end of buffer inc ZP.UserBuf+1 but first adjust user buffer pointer - inc tposlh and position + inc XDOS.TmpPos+1 and position bne L451C - inc tposhi + inc XDOS.TmpPos+2 bne L451C lda #MLI.E.BEYEOF out of range if > 32MB @@ -532,14 +536,14 @@ L4539 iny and position bne L4546 inc ZP.UserBuf+1 inc pointers - inc tposlh + inc XDOS.TmpPos+1 bne L4546 - inc tposhi + inc XDOS.TmpPos+2 L4546 bit setvflg set v flag -L4549 sty tposll save low position +L4549 sty XDOS.TmpPos save low position stx rwreql and remainder of request count. php save statuses @@ -547,7 +551,7 @@ L4549 sty tposll save low position jsr XDOS.SetFCBStatus clc adjust user's low buffer address - lda tposll + lda XDOS.TmpPos adc ZP.UserBuf sta ZP.UserBuf bcc L4564 @@ -576,7 +580,7 @@ topdown jsr swapdown make current 1st block an entry in new L457A jsr alcwblk get another block address for the sap bcs L45B1 level index. branch if errors. - lda tposhi calculate position of new index block + lda XDOS.TmpPos+2 calculate position of new index block lsr in the top of the tree. tay lda scrtch get address of newly allocated index @@ -686,9 +690,9 @@ XDOS.TestWPA sta ZP.UNITNUM make the device status call .1 jmp XDOS.PopBlkNumRTS restore the block # *-------------------------------------- -XDOS.Tpos2Y lda tposhi get index to next block address +XDOS.Tpos2Y lda XDOS.TmpPos+2 get index to next block address lsr - lda tposlh + lda XDOS.TmpPos+1 ror tay index to address = int(pos/512) XDOS.Tpos2Y.RTS rts diff --git a/ProDOS.FX/ProDOS.S.XDOS.E.txt b/ProDOS.FX/ProDOS.S.XDOS.E.txt index a516b0d4..72d221ee 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.E.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.E.txt @@ -300,7 +300,7 @@ L47EF lda XDOS.FCBs+FCB.EOF,y ldx #$02 L47FD lda (ZP.A3L),y position mark to new eof - sta tposll,x + sta XDOS.TmpPos,x dey dex bpl L47FD @@ -308,7 +308,7 @@ L47FD lda (ZP.A3L),y position mark to new eof ldx #$02 point to 3rd byte. L4808 lda oldeof,x see if eof moved backwards so blocks - cmp tposll,x can be released. + cmp XDOS.TmpPos,x can be released. bcc eofset (branch if not) bne purge branch if blocks to be released @@ -344,7 +344,7 @@ purge jsr XDOS.FlushOne make sure file is current ldx #$02 L4840 lda XDOS.FCBs+FCB.MARK,y - cmp tposll,x compare until not equal or carry clear. + cmp XDOS.TmpPos,x compare until not equal or carry clear. bcc L485F branch if eof > mark. bne L484E branch if eof < mark. @@ -356,7 +356,7 @@ L4840 lda XDOS.FCBs+FCB.MARK,y L484E ldy XDOS.FCBPtr ldx #$00 -L4853 lda tposll,x fake position, correct position will +L4853 lda XDOS.TmpPos,x fake position, correct position will sta XDOS.FCBs+FCB.MARK,y be made below... iny inx @@ -364,13 +364,13 @@ L4853 lda tposll,x fake position, correct position will bne L4853 L485F jsr XDOS.GetFreeCntVCBX force free block count before releasing - lda tposll blocks. prepare for purge of excess... + lda XDOS.TmpPos blocks. prepare for purge of excess... sta dseed all blocks and bytes beyond new eof - lda tposlh must be zero'd + lda XDOS.TmpPos+1 must be zero'd sta dsap and #$01 sta dseed+1 - lda tposhi + lda XDOS.TmpPos+2 lsr sta dtree ror dsap pass position in terms of block & bytes. @@ -396,9 +396,9 @@ L485F jsr XDOS.GetFreeCntVCBX force free block count before releasing L489F sta dseed+1 L48A2 ldy XDOS.FCBPtr also must pass file's 1st block address. lda XDOS.FCBs+FCB.1stBLK,y - sta firstbl + sta XDOS.1stBLK lda XDOS.FCBs+FCB.1stBLK+1,y - sta firstbh + sta XDOS.1stBLK+1 stz deblock lastly, initialize # of blocks to stz deblock+1 be free'd. jsr detree deallocate blocks from tree. @@ -410,7 +410,7 @@ L48A2 ldy XDOS.FCBPtr also must pass file's 1st block address. ldx #$ff L48C2 inx - lda firstbl,x + lda XDOS.1stBLK,x sta XDOS.FCBs+FCB.1stBLK,y move in possible new first file block lda XDOS.FCBs+FCB.UBLK,y address. adjust usage count also sbc deblock,x @@ -431,7 +431,7 @@ L48C2 inx ldx #2 L48F2 lda XDOS.FCBs+FCB.MARK,y tell 'rdposn' to go to correct - sta tposll,x + sta XDOS.TmpPos,x eor #$80 position from incorrect place. sta XDOS.FCBs+FCB.MARK,y dey @@ -500,7 +500,7 @@ XDOS.GetFileInfo bcs .9 .1 lda XDOS.DE.Filename transfer bytes from internal order to - lsr call spec via 'inftabl' translation + lsr call spec via XDOS.DE2FINFO translation lsr table but first change storage type to lsr external (low nibble) format. lsr @@ -508,7 +508,7 @@ XDOS.GetFileInfo ldy #$11 index to last of user's spec table. -.2 lda inftabl-3,y +.2 lda XDOS.DE2FINFO-3,y and #$7F strip bit used by setinfo tax lda XDOS.DE.Filename,x move directory info to call spec. table @@ -533,7 +533,7 @@ XDOS.SetFileInfo ldy #$0D init pointer to user supplied list. -.1 ldx inftabl-3,y get index to corresponding 'd.' table. +.1 ldx XDOS.DE2FINFO-3,y get index to corresponding 'd.' table. bmi .2 branch if parameter can't be set. lda (ZP.A3L),y @@ -905,9 +905,9 @@ L4B45 lda GP.DEVNUM last device used. bcs L4B67 before going thru deallocation. lda XDOS.DE.KeyPtr 'detree' needs first block address - sta firstbl + sta XDOS.1stBLK lda XDOS.DE.KeyPtr+1 - sta firstbh + sta XDOS.1stBLK+1 lda XDOS.DE.Filename find out which storage type. and #$F0 strip off name length. cmp #$40 is it a seed, sapling or tree ? @@ -927,9 +927,9 @@ XDOS.DestroyFile * lda #$00 set 'detree' input variables, must be -L4B6F stz stortyp,x in order: deblock, dtree, dsap, dseed. +.1 stz stortyp,x in order: deblock, dtree, dsap, dseed. dex - bne L4B6F loop until all zero'd. + bne .1 loop until all zero'd. lda #$02 this avoids an extra file i/o and pre- sta dseed+1 vents destruction of any deleted data. @@ -938,8 +938,8 @@ L4B6F stz stortyp,x in order: deblock, dtree, dsap, dseed. dec delflag reset flag. bcs L4B93 (de-evolution) -L4B85 ldx firstbh - lda firstbl now deallocate seed. +L4B85 lda XDOS.1stBLK now deallocate seed. + ldx XDOS.1stBLK+1 jsr XDOS.DeallocAX bcs L4B93 @@ -961,7 +961,7 @@ L4BAF cmp #$01 adjust carry accordingly rts *-------------------------------------- L4BCD bcc L4B85 branch widened (always taken) - +*-------------------------------------- XDOS.DestroyDir cmp #$D0 is this a directory file ? bne L4C1B no, file incompatible. diff --git a/ProDOS.FX/ProDOS.S.XDOS.F.txt b/ProDOS.FX/ProDOS.S.XDOS.F.txt index 95df25f3..769b44ba 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.F.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.F.txt @@ -6,7 +6,7 @@ NEW * * on entry: * stortype = storage type in upper nibble, lower nibble is undisturbed. -* firstbl & firstbh = first block of file (index or data). +* XDOS.1stBLK = first block of file (index or data). * deblock = 0 * dtree = ptr to 1st block with data to be deallocated at tree level. * dsap = ptr to 1st block at sapling level. @@ -14,7 +14,7 @@ NEW * * on exit: * stortype = modified result of storage type (if applicable). -* firstbl & h = modified if storage type changed. +* XDOS.1stBLK = modified if storage type changed. * deblock = total number of blocks freed at all levels. * dtree, dsap, deseed unchanged. * @@ -204,16 +204,16 @@ L4D4F jmp XDOS.WriteGBuf update data block to disk. L4D52 rts return error status. -drdfrst lda firstbl read specified 1st block into XDOS.GBuf - ldx firstbh +drdfrst lda XDOS.1stBLK read specified 1st block into XDOS.GBuf + ldx XDOS.1stBLK+1 jmp XDOS.ReadGBufAX go read it *-------------------------------------- * beware that dealloc may bring in a new bitmap block and may destroy * locations 46 and 47 which are used to point to the current index block. *-------------------------------------- -shrink ldx firstbh first deallocate top index block +shrink ldx XDOS.1stBLK+1 first deallocate top index block phx - lda firstbl + lda XDOS.1stBLK pha save block address of this index block. jsr XDOS.DeallocAX free it from the bitmap pla @@ -223,9 +223,9 @@ shrink ldx firstbh first deallocate top index block bcs L4D1E report errors. lda XDOS.GBuf get # of new 1st block from old index. - sta firstbl + sta XDOS.1stBLK lda XDOS.GBuf+$100 - sta firstbh + sta XDOS.1stBLK+1 ldy #$00 jsr XDOS.SwapGBUFY flip that one entry in old top index. sec now change file type, @@ -830,7 +830,7 @@ XDOS.CmdFlags .HS A0A1A2 .HS 50515253 .HS 94959697 -cmdtable .DA XDOS.Create +XDOS.CmdJmps .DA XDOS.Create .DA XDOS.Destroy .DA XDOS.Rename .DA XDOS.SetFileInfo @@ -869,13 +869,18 @@ xdosver .HS 00 compat .HS 00 .HS C3270D000000 .FIN -rootstuf .HS 0F02000400000800 +rootstuf .HS 0F.0200.0400.000800 whichbit .HS 8040201008040201 -ofcbtbl .HS 0C0D1819151617 -inftabl .HS 1E101F2080939421 - .HS 22232418191A1B -deathmsg .AS -"SYS ERR-$0" -deathmsg.LEN .EQ *-deathmsg +XDOS.DE2FCB .DA #FCB.1stBLK+0 + .DA #FCB.1stBLK+1 + .DA #FCB.UBLK+0 + .DA #FCB.UBLK+1 + .DA #FCB.EOF+0 + .DA #FCB.EOF+1 + .DA #FCB.EOF+2 +XDOS.DE2FINFO .HS 1E.10.1F.20.80.93.94.21.22.23.24.18.19.1A.1B +XDOS.SysErrMsg .AS -"SYS ERR-$0" +XDOS.SysErrMsgL .EQ *-XDOS.SysErr *-------------------------------------- XDOS.DATA .DUMMY *-------------------------------------- @@ -943,9 +948,7 @@ XDOS.BM.DevID .HS 00 XDOS.BM.BlkNum .HS 0000 XDOS.BM.Idx .HS 00 -tposll .HS 00 -tposlh .HS 00 -tposhi .HS 00 +XDOS.TmpPos .HS 000000 rwreql .HS 00 rwreqh .HS 00 @@ -968,8 +971,7 @@ cferr .HS 00 * deallocation temporary variables -firstbl .HS 00 -firstbh .HS 00 +XDOS.1stBLK .HS 0000 stortyp .HS 00 *-------------------------------------- deblock .HS 0000 diff --git a/SBIN/NETWORKD.S.txt b/SBIN/NETWORKD.S.txt index 463f268c..cf5c95f5 100644 --- a/SBIN/NETWORKD.S.txt +++ b/SBIN/NETWORKD.S.txt @@ -79,7 +79,7 @@ CS.INIT lda DevID stx hBuf >STYA IOCTL+S.IOCTL.BUFPTR for CS.INIT.DEV - + jsr CS.INIT.DEV bcs .90 diff --git a/SBIN/TELNETD.S.txt b/SBIN/TELNETD.S.txt index 7f73e7bd..a9d16db8 100644 --- a/SBIN/TELNETD.S.txt +++ b/SBIN/TELNETD.S.txt @@ -244,7 +244,7 @@ MSG.TCPIPERR .AZ "TELNETD:TCP/IP Not initialized properly." MSG.SKTERR .AZ "TELNETD:Listen Error." MSG.INCOMING .CZ "TELNETD:Incoming Connection [SKT=%h] From : %d.%d.%d.%d\r\n" *-------------------------------------- -NOD.Template .AZ "/tmp/tty%h" +NOD.Template .AZ "/dev/tty%h" CMD.Template .AZ "${ROOT}sbin/getty -E %s ${ROOT}sbin/login" *-------------------------------------- SA.LOCAL .DA #AF.INET S.SOCKADDR.AF diff --git a/SHARED/X.SSC.DRV.S.txt b/SHARED/X.SSC.DRV.S.txt index f543ea03..06d4edcc 100644 --- a/SHARED/X.SSC.DRV.S.txt +++ b/SHARED/X.SSC.DRV.S.txt @@ -49,7 +49,7 @@ Dev.Detect >STYA ZPArgPtr .1 and #$0f tay - lda A2osX.S,y + lda A2osX.S-1,y bne .3 ldx #DEVSIG.Length-1 @@ -112,7 +112,7 @@ Dev.Detect >STYA ZPArgPtr and #$0F tay lda #A2osX.S.COM - sta A2osX.S,y + sta A2osX.S-1,y * clc diff --git a/SHARED/X.UDETH.DRV.S.txt b/SHARED/X.UDETH.DRV.S.txt index 4494cbac..96fa7589 100644 --- a/SHARED/X.UDETH.DRV.S.txt +++ b/SHARED/X.UDETH.DRV.S.txt @@ -144,7 +144,7 @@ Dev.Detect >STYA ZPArgPtr ldx DEVSLOT0x lda #A2osX.S.NIC - sta A2osX.S,x + sta A2osX.S-1,x * clc .9 rts *-------------------------------------- diff --git a/SYS/KERNEL.S.GP.txt b/SYS/KERNEL.S.GP.txt index 9886a644..6e210807 100644 --- a/SYS/KERNEL.S.GP.txt +++ b/SYS/KERNEL.S.GP.txt @@ -49,17 +49,15 @@ NEW *-------------------------------------- * Public Vars *-------------------------------------- - .LIST ON .BS A2osX.KCONFIG-* - .LIST OFF *-------------------------------------- * Kernel Config Block *-------------------------------------- - .DA #6 A2osX.HZ=60hz - .DA #2 A2osX.TTYDEVS=2 - .DA #0 ChRoot/Preemptive Disabled - .HS 000000000000 spare - .HS 00000000000000 All Slots marked as "Free" + .DA #6 A2osX.HZ : 60hz + .DA #2 A2osX.TTYDEVS : 2 + .DA #0 A2osX.F : ChRoot/Preemptive Disabled + .BS A2osX.S-* + .BS 7 All Slots marked as "Free" *-------------------------------------- MAN SAVE usr/src/sys/kernel.s.gp diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index 394909c9..e6bef4b7 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -139,7 +139,9 @@ Kernel.Init2 sei >LDYAI MSG.FX jsr PrintFYA -.5 lda A2osX.HZ +.5 sta IO.SETALTZP + lda A2osX.HZ + sta IO.CLRALTZP pha >LDYAI MSG.HZ jsr PrintFYA @@ -293,6 +295,15 @@ KConfigLoad >LDYAI MSG.KCREAD pla plp bcs .9 + + ldx #15 + +.3 lda A2osX.KCONFIG,x + sta IO.SETALTZP + sta A2osX.KCONFIG,x + sta IO.CLRALTZP + dex + bpl .3 >LDYAI MSG.KCREAD.OK bra .8 @@ -619,7 +630,7 @@ CPU.Init.Z80 >PUSHWI MSG.Z80 sta A2osX.Z80SLOT tax lda #A2osX.S.Z80 - sta A2osX.S,x + sta A2osX.S-1,x >PUSHWI MSG.Z80.OK lda A2osX.Z80SLOT @@ -845,7 +856,7 @@ DevMgrInit >LDYAI MSG.DEV lda #A2osX.S.BLK .7 ldx FD.BDEV+S.FD.DEV.BUSID - sta A2osX.S,x + sta A2osX.S-1,x .8 dec .1+1 bmi .80 @@ -907,7 +918,7 @@ DevMgr.VXD >LDYAI VSD.PATCH bit IO.RRAMWRAMBNK1 lda #A2osX.S.VXD - sta A2osX.S,x + sta A2osX.S-1,x plp @@ -1109,7 +1120,7 @@ IrqMgr.TClk stz ZPPtr1 Try finding a TClock Card... tay get $n0 sty IRQ.n0 lda #A2osX.S.CLK - sta A2osX.S,x + sta A2osX.S-1,x lda #$40+$20 Enable interrupt + 64Hz sta $c080,y diff --git a/SYS/KERNEL.S.STAT.txt b/SYS/KERNEL.S.STAT.txt index 29d68e84..ed5903cf 100644 --- a/SYS/KERNEL.S.STAT.txt +++ b/SYS/KERNEL.S.STAT.txt @@ -154,7 +154,7 @@ K.MKFIFO jsr STAT.PM ldy #0 -.1 lda STAT.TMPFIFO,y +.1 lda STAT.DEVFIFO,y sta (ZPPtr1),y fill pathname buffer iny cpy #9 @@ -283,7 +283,7 @@ STAT.PM >PULLW K.S.STAT+S.STAT.MODE >PULLW ZPPtr1 pathname rts *-------------------------------------- -STAT.TMPFIFO .AS "/tmp/fifo" +STAT.DEVFIFO .AS "/dev/fifo" *-------------------------------------- MAN SAVE usr/src/sys/kernel.s.stat diff --git a/SYS/KERNEL.S.TERMX.txt b/SYS/KERNEL.S.TERMX.txt index 3c668a88..f85c4b7f 100644 --- a/SYS/KERNEL.S.TERMX.txt +++ b/SYS/KERNEL.S.TERMX.txt @@ -359,43 +359,57 @@ TERMX.CUF clc .8 clc rts *-------------------------------------- -TERMX.BS -TERMX.CUB ldy #S.DCB.TTY.CH - lda (ZPDCBPtr),y - beq TERMX.BS.8 +TERMX.CUB sec no wrap - dec - sta (ZPDCBPtr),y + .HS 90 BCC -TERMX.BS.8 clc +TERMX.BS clc wrap + + jsr TERMX.BS1 + + clc rts *-------------------------------------- -TERMX.DEL ldy #S.DCB.TTY.CH +TERMX.BS1 ldy #S.DCB.TTY.CH lda (ZPDCBPtr),y beq .1 dec sta (ZPDCBPtr),y - bra .3 -.1 ldy #S.DCB.TTY.CV + clc + rts + +.1 bcs .9 no wrap + + ldy #S.DCB.TTY.CV lda (ZPDCBPtr),y - beq TERMX.BS.8 + sec + beq .9 dec sta (ZPDCBPtr),y ldy #S.DCB.TTY.CH lda #79 - sta (ZPDCBPtr),y S.DCB.TTY.CH + sta (ZPDCBPtr),y + + clc -.3 lda #C.SPACE +.9 rts +*-------------------------------------- +TERMX.DEL clc wrap + jsr TERMX.BS1 + bcs TERMX.CR.8 + + lda #C.SPACE jmp SetCharAtCurPos *-------------------------------------- TERMX.CR lda #0 ldy #S.DCB.TTY.CH sta (ZPDCBPtr),y - clc + +TERMX.CR.8 clc rts *-------------------------------------- TERMX.SO sec diff --git a/SYS/KERNEL.S.UNISTD.txt b/SYS/KERNEL.S.UNISTD.txt index 385176c7..ad1758a0 100644 --- a/SYS/KERNEL.S.UNISTD.txt +++ b/SYS/KERNEL.S.UNISTD.txt @@ -38,7 +38,7 @@ UNISTD.Open ldx #5 /dev/ jsr K.GetDevByName bcc .6 -.2 ldx #1 + ldx #1 .3 lda FILEs.hFD-1,x beq .5 @@ -69,7 +69,11 @@ UNISTD.Open ldx #5 /dev/ cpx #K.FILE.MAX+1 bcc .3 - jmp FS.OPEN.REG + lda #MLI.E.NODEV +* sec + rts + +.2 jmp FS.OPEN.REG .6 jsr DEV.GetPDrv