Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!marque!lakesys!barak From: barak@lakesys.UUCP (Mark Litscher) Newsgroups: comp.sys.apple Subject: Help! Summary: unidisk 3.5, eject, program Keywords: I need Help! Message-ID: <722@lakesys.UUCP> Date: 13 Jun 89 23:08:37 GMT Reply-To: barak@lakesys.UUCP (Mark Litscher) Organization: Lake Systems - Milwaukee, Wisconsin Lines: 80 Ok all of you apple guru's out there, I need help! I have a apple //c, with a unidisk 3.5, 1200bps modem, and a printer. I wrote this ml program in an attempt to get my unidisk to eject a disk. when I execute it nothing happens, but if I change the command number in line 1020 to a FF, there is a message saying 'An error has occured: 01' <- bad command number. this was written using S. C. Macro assembler. The equates file has equates for cout, crout, prbyte, etc. print is a subroutine that prints out the ascii that is pointed to by the return address on the stack until it encounters a character with the hi-bit cleared, then it prints the last character with the high bit set, updates the stack, and returns. -----------------------------------< Cut Here >------------------------ 0000 .or $2000 0001 .in /ram/equates 0002 zpagelo .eq $f9 0003 zpagehi .eq $fa 1000 start jsr locate 1001 bcs error 1010 jsr dispatch 1020 .hs 04 1030 .da plist 1040 bcs error 1050 rts 1060 error pha 1065 jsr print 1070 .at -"An error has occured: " 1080 pla 1090 jsr prbyte 1100 rts 1110 *-------------------------------- 1120 dispatch .eq * 1130 jmp (zpagelo) 1140 *-------------------------------- 1150 plist .hs 03 ;parameter count 1160 .hs 01 ;device number 1170 .da ctrllst ;address of the control list 1180 .hs 04 1190 *-------------------------------- 1200 ctrllst .eq * 1210 .hs 00 1220 *-------------------------------- 5000 locate lda #$c7 5010 sta zpagehi 5020 lda #0 5030 sta zpagelo 5040 ldx #7 5050 .1 ldy #7 5060 .2 lda (zpagelo),y 5070 cmp sigtab,y 5080 beq .3 5090 dec zpagehi 5100 dex 5110 bne .1 5120 sec 5130 rts ;not found 5140 .3 dey 5145 dey 5150 bpl .2 5160 .4 lda #$ff 5170 sta zpagelo 5180 ldy #0 5190 lda (zpagelo),y 5200 clc 5210 adc #3 5220 sta zpagelo 5230 clc 5240 rts 5250 sigtab .hs ff.20.ff.00 5251 .hs ff.03.ff.00 9999 .in /ram/super.print.sbr -----------------------------------< Cut Here >------------------------ ------------------------------------------------------------------------------ | Mark Litscher | "Ahead warp zillion!" | | barak@lakesys.COM | "Ack phbbbt!" | ------------------------------------------------------------------------------