home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   CBM      Commodore Computer Conference      4,328 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,505 of 4,328   
   Lawrence Woodman to Lawrence Woodman   
   Re: Closing a file in Assembly on the VI   
   18 Jun 21 06:56:52   
   
   INTL 3:770/1 3:770/3   
   REPLYADDR lorrywoodman@gmail.com   
   REPLYTO 3:770/3.0 UUCP   
   MSGID:  2519afa1   
   REPLY:  1e99332a   
   PID: SoupGate-Win32 v1.05   
   On Thu, 17 Jun 2021 18:56:16 -0000 (UTC), Lawrence Woodman wrote:   
      
   > On Thu, 17 Jun 2021 11:29:57 -0000 (UTC), Tilmann Hentze wrote:   
   >   
   >> Lawrence Woodman  wrote:   
   >>> I have created a piece of code which replicates the problem below if   
   >>> anyone has any ideas where I'm going wrong I'd be very grateful.   
   >>>   
   >>> [code snipped]   
   >>>   
   >>> main   
   >>>             lda  #$07         ; Length of file name   
   >>>             ldx  #>>             ldy  #>filename   ; High byte of file name location   
   >>>             jsr  SETNAM       ; Set the name   
   >>   
   >>>             lda  #$08         ; Logical file number   
   >>>             ldx  #$08         ; Device number   
   >>>             ldy  #$01         ; Secondary address - $01 because saving   
   >>>             jsr  SETLFS       ; Set above parameters   
   >>   
   >> I'd switch the two previous blocks around, so that you first set up the   
   >> channel and then set the file name.   
   >   
   > Thanks for the suggestion.  I gave it a go but unfortunately it still   
   > gives the same result.   
   >   
   >   
   >>> [code snipped]   
   >>>             lda  #$08         ; Logical file number   
   >>>             jsr  CLOSE        ; Close the file   
   >>   
   >> Looks good to me. Perhaps it will work with the first mentioned change?   
   >   
   > Sadly not.  However, I'm not sure that a CLOSE is necessary as I noticed   
   > in other code examples that it isn't used.  I've tried without it and   
   > also checked for errors via a carry after the SAVE but still no joy. If   
   > you or anyone else has any ideas I'd love to get this working.   
      
      
   I've managed to track down the problem.  Because I was automating some of   
   the testing around this I hadn't left a long enough delay before   
   displaying the directory.  It turns out that it takes a little longer   
   than I expected for the SAVE command to complete the write.  Once I left   
   a bigger delay before checking the directory everything was fine.  It   
   also appears that there is no need to call CLOSE either.   
      
      
   Best wishes   
      
      
   Lorry   
      
   ---   
   Advanced Use of .LBR Files on CP/M   
   https://techtinkering.com/articles/advanced-use-of-lbr-files-on-cpm/   
   --- SoupGate-Win32 v1.05   
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)   
   SEEN-BY: 1/123 14/0 18/200 90/1 105/81 120/340 123/131 129/305 226/30   
   SEEN-BY: 227/114 229/424 426 428 700 1016 1017 240/5832 249/1 206   
   SEEN-BY: 249/317 400 261/38 282/1038 298/25 26 301/1 317/3 322/757   
   SEEN-BY: 342/200   
   PATH: 770/3 1 153/757 221/6 301/1 229/426 317/3 298/25 14/0 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca