mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-03 22:30:09 +00:00
Some groundwork for OSGBPB.
This commit is contained in:
parent
26501923c8
commit
2a65154486
@ -60,11 +60,23 @@ OSFINDRET >>> ENTAUX
|
||||
RTS
|
||||
|
||||
* OSGBPB - Get/Put a block of bytes to/from an open file
|
||||
GBPBHND LDA #<OSGBPBM
|
||||
LDY #>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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user