[Coco] Simplified M/L Disk I/O

coco at yourdvd.net coco at yourdvd.net
Sat Apr 14 16:45:16 EDT 2007


As Robert Gault suggested, everything you need is in the unravelled
series.

I've had a go at the unravelled books today, and kludged together the
following program (DECB 1.1 only)
which should create a text file called: "TEST1234.TXT" CONTAINING THE
TEXT "THIS IS A TEST"

I don't know yet if this is fail-safe, gotta do some more reading of the
unravelled.

Loading files should be just as easy.

I haven't commented it: you're going to have to reference the unravelled
books.

here is the listing:

                                          EDTASM+/01.00.00    PAGE 1
 
 
2600               00100         ORG     $2600
2600 30   8D 0029  00110 BEGIN   LEAX    FILNM,PCR
2604 108E 094C     00120         LDY     #$094C
2608 A6   80       00130 BEGIN0  LDA     ,X+
260A 27   04       00140         BEQ     BEGIN5
260C A7   A0       00150         STA     ,Y+
260E 20   F8       00160         BRA     BEGIN0
2610 86   01       00170 BEGIN5  LDA     #1
2612 97   6F       00180         STA     $6F
2614 BD   CA04     00190         JSR     $CA04
2617 30   8D 0020  00200         LEAX    MSG,PCR
261B A6   80       00210 LOOP    LDA     ,X+
261D 27   0A       00220         BEQ     LOOP1
261F 34   12       00230         PSHS    A,X
2621 AD   9F A002  00240         JSR     [$A002]
2625 35   12       00250         PULS    X,A
2627 20   F2       00260         BRA     LOOP
2629 BD   A42D     00270 LOOP1   JSR     $A42D
262C 39            00280         RTS
262D      54       00290 FILNM   FCC     'TEST1234TXT'
          45       
          53       
          54       
          31       
          32       
          33       
          34       
          54       
          58       
          54       
2638      01FF     00300         FDB     $01FF
263A      00       00310         FCB     $00
263B      54       00320 MSG     FCC     'THIS IS A TEST'
          48       
          49       
          53       
          20       
          49       
          53       
          20       
          41       
          20       
          54       
          45       
          53       
          54       
2649      00       00330         FCB     $00
          2600     00340         END     BEGIN
 
00000 TOTAL ERRORS
 
 
 
 
 
 
 
 
 
 
 
 
 
                                          EDTASM+/01.00.00    PAGE 2
 
 
BEGIN   2600    
BEGIN0  2608    
BEGIN5  2610    
FILNM   262D    
LOOP    261B    
LOOP1   2629    
MSG     263B    
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 





More information about the Coco mailing list