From: "Chris Cureau"; on Friday, Dec. 16, 2011; at 01:46 PM -0500 > > On Fri, Dec 16, 2011 at 12:44 PM, Chris Cureau wrote: > > > > I'm running a bit of code here which should work, from all I can > > see. But, it isn't. I'm wondering if ca65 is translating it > > incorrectly? Not shown is readerr, which simply reads and prints > > the error channel. When I run the code, it reports a 73 (as I > > would expect from a reset drive), then a "62, FILE NOT FOUND". > > The drive should open "#" as a buffer. Am I doing something wrong? > > code: > > > > ; set up command channel > > lda #15 ;logical file number 15 > > ldx #8 ;device 8 > > ldy #15 ;secondary address 15 > > jsr SETLFS ;set LA, FA, SA > > lda #0 ;zero-length file-name > > jsr SETNAM > > jsr OPEN ;open command channel > > jsr readerr > > > > ; set up for random access > > lda #2 ;logical file number 2 > > ldx #8 ;device 8 > > ldy #2 ;secondary address 2 > > jsr SETLFS ;set LA, FA, SA > > lda #1 > > ldx #>buffer > > ldy #<buffer ;set file name > > jsr SETNAM > > jsr OPEN ;open command channel > > jsr readerr > > ... > > ; data > > buffer: > > .byte "#" > > drvcmd: > > .byte "U1 2 0 18 1" > > endcmd: > > The buffer lines above should read: > lda #drvcmd-buffer ;single-character file-name > ldx #<buffer > ldy #>buffer ;set file name > > I had modified them while "grasping at straws" ... sorry. (I apologize for not answerring your mail that was sent through Sourceforge. I don't look at stuff from there as often as I should.) That "FILE NOT FOUND" certainly explains the "NO CHANNEL" message that you had seen before. Only letters need to be converted; numerals and most punctuation are the same in both character sets. So, that's not the problem. I just had an evil thought: Are you practicing coding on a real C128 or in VICE? VICE is the only place where I have seen that error when trying to open "#". And then, it was only when I was using a virtual drive, and I had forgotten to attach a disk image. In that situation, VICE sent the name to the host OS, which knows nothing about "#". So, of course, it complained. ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Sun Dec 18 22:19:22 2011
This archive was generated by hypermail 2.1.8 : 2011-12-18 22:19:26 CET