diff --git a/auxmem.hostfs.s b/auxmem.hostfs.s index 9a3f327..48b7dd8 100644 --- a/auxmem.hostfs.s +++ b/auxmem.hostfs.s @@ -60,11 +60,23 @@ OSFINDRET >>> ENTAUX RTS * OSGBPB - Get/Put a block of bytes to/from an open file -GBPBHND LDA #OSGBPBM - JMP PRSTR -OSGBPBM ASC 'OSGBPB.' - DB $00 +GBPBHND PHX + PHY + PHA + JSR XYtoLPTR ; Copy control block to GBPBBLK .. + LDY #$0C ; .. in main memory + >>> WRTMAIN +:L1 LDA (OSLPTR),Y + STA GBPBBLK,Y + DEY + BNE :L1 + >>> WRTAUX + PLA ; A represents the command + >>> XF2MAIN,GBPB +OSGBPBRET >>> ENTAUX + PLY + PLX + RTS * OSBPUT - write one byte to an open file BPUTHND PHX diff --git a/mainmem.fsequ.s b/mainmem.fsequ.s index 743647a..077edfe 100644 --- a/mainmem.fsequ.s +++ b/mainmem.fsequ.s @@ -15,7 +15,14 @@ CMDPATH EQU $0280 ; Path used to start Applecorn MOSFILE1 EQU $0300 ; length + 64 bytes MOSFILE2 EQU $0341 ; length + 64 bytes MOSFILE EQU MOSFILE1 -* $0382 ; $3C bytes here + +GBPBBLK EQU $0382 +GBPBHDL EQU $GBPBBLK+0 ; File handle +GBPBDAT EQU $GBPBBLK+1 ; Pointer to data +GBPBNUM EQU $GBPBBLK+5 ; Num bytes to transfer +GBPBPTR EQU $GBPBBLK+9 ; File pointer +GBPBEND EQU GBPBBLK+12 +* $038F ; $2F bytes here * FILEBLK EQU $03BE FBPTR EQU FILEBLK+0 ; Pointer to name (in aux) diff --git a/mainmem.svc.s b/mainmem.svc.s index d61aec7..f638996 100644 --- a/mainmem.svc.s +++ b/mainmem.svc.s @@ -322,6 +322,14 @@ CFILE >>> ENTMAIN PLX BCS FINDEXIT +* ProDOS file handling for MOS OSGBPB call +* A=1 : Write bytes to disk, using new seq pointer +* A=2 : Write bytes to disk, ignoring seq pointer +* A=3 : Read bytes from disk, using new seq pointer +* A=4 : Read bytes from disk, ignoring seq pointer +GBPB >>> ENTMAIN +* ... + >>> XF2AUX,OSGBPBRET * ProDOS file handling for MOS OSBGET call * Returns with char read in A and error num in Y (or 0)