Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #825

Re: ProDOS MLI -- why I'm failing!

From David Schmidt <schmidtd@my-deja.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: ProDOS MLI -- why I'm failing!
Date 2013-08-28 10:18 -0400
Organization A noiseless patient Spider
Message-ID <kvl0qq$ipo$1@dont-email.me> (permalink)
References <0f4e038e-98dd-4b3d-8bed-a6913313f365@googlegroups.com> <fa77085d-ab98-43cd-ba82-b50d87124e31@googlegroups.com> <48518a47-f08a-429a-bf42-0309fd456e0b@googlegroups.com> <e44cd0b1-d7e1-4b14-af42-92da7a74027b@googlegroups.com> <29b505dc-dd25-4228-94cf-04ed82f187a7@googlegroups.com>

Show all headers | View raw


On 8/28/2013 8:48 AM, jcullenhome@comcast.net wrote:
> This MLI stuff is pretty straightforward, not complicated really. What's going on?? :O
> Can anybody find anything off with my code / calls above?

I converted it to ca65 syntax and did similar cleanup as Rob.  Running 
from BASIC or the program selector, and using MAIN as the test program 
to open, I get zeroes on the MLI calls.  The main things to check in 
your code are:
1) you don't set the file name length via X after figuring it out, as 
pointed out by Rob
2) you need to ensure that you actually *have* a /DEV/ prefix on the 
disk you're using in the first place.

My ca65 code, for reference:

          .include "applechr.i" ; Some Merlin-esque macros
          .ORG $2000 ; Unnecessary, but pretties up the listing

HOME      = $FC58
COUT      = $FDED
KEY       = $C000
STROBE    = $C010
IOBUFF    = $900

MAIN:     JSR HOME
           JSR GETFILE

HERE:     JMP HERE ; Just loop since I'm too lazy for QUIT MLI
           RTS ; Would crash if called from selector

;--------------------------------
;--- routines ------

;--- getFile prompts for and loads the image file

GETFILE:  LDX #0
MSGLOOP:  LDA FILEMSG,X
           CPX #25
           BEQ DONE
           JSR COUT
           INX
           BNE MSGLOOP

DONE:     LDX #0
GETKEY:   LDA KEY
           BPL GETKEY
           STA STROBE
           CMP #$8D
           BEQ SETPFX
           JSR COUT
           AND #$7F ; Strip the high bit
           STA FILENAME,X
           INX
           BNE GETKEY

SETPFX:   JSR COUT ; Use final return to split the line
           STX FILENAMC
           JSR $BF00
           .BYTE $C6
           .ADDR SETP
           CLC

           JSR COUT   ;error code

           JSR $BF00 ;call MLI
           .BYTE $C8 ;open command
           .ADDR OPENPARM
           CLC

           JSR COUT ;testing error code

           RTS

;data area------
SETP:     .BYTE $01
           .ADDR PREFIXC


OPENPARM: .BYTE $03
           .ADDR FILENAMC
           .ADDR IOBUFF
REFNUM:   .BYTE $00


FILEMSG:  asc "Please enter a filename: "

FILENAMC: .BYTE $00
FILENAME: .res 15,$00 ; Space for 15 characters

PREFIXC:  .BYTE $05
PREFIX:   asc "/DEV/" ; Make sure this actually exists...

Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-26 20:35 -0700
  Re: ProDOS MLI -- why I'm failing! gids.rs@sasktel.net - 2013-08-26 22:06 -0700
    Re: ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-27 18:38 -0700
      Re: ProDOS MLI -- why I'm failing! David Schmenk <dschmenk@gmail.com> - 2013-08-27 19:28 -0700
      Re: ProDOS MLI -- why I'm failing! gids.rs@sasktel.net - 2013-08-27 22:19 -0700
        Re: ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-28 05:48 -0700
          Re: ProDOS MLI -- why I'm failing! David Schmidt <schmidtd@my-deja.com> - 2013-08-28 10:18 -0400
            Re: ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-28 08:42 -0700
  Re: ProDOS MLI -- why I'm failing! Antoine Vignau <antoine.vignau@laposte.net> - 2013-08-28 11:33 -0700
    Re: ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-28 15:27 -0700
      Re: ProDOS MLI -- why I'm failing! jcullenhome@comcast.net - 2013-08-28 19:45 -0700
        Re: ProDOS MLI -- why I'm failing! "Bill Buckels" <bbuckels@mts.net> - 2013-08-29 07:33 -0500
        Re: ProDOS MLI -- why I'm failing! Antoine Vignau <antoine.vignau@laposte.net> - 2013-08-29 10:02 -0700

csiph-web