Re: [cc65] Atari DIO

Date view Thread view Subject view

From: Shawn Jefferson (sjefferson_at_sd62.bc.ca)
Date: 2002-10-31 21:23:58


>>Couldn't I just write into the sectsizetab * 4 * drive number?  That
>>would be easy enough.  Is there some way to reference the sectsizetab
>>from my source code?
>
>This would be what my "small assembler function" would have done. You
>cannot do it since the sectsizetab variable is invisible to C (no
>starting '_').

Here is what I have:

; unsigned char __fastcall__ dio_set_sectsize(dhandle_t handle,
;                                             unsigned int sectsize);

	.export     _dio_set_sectsize
;        .include    "atari.inc"
	.importzp   ptr1,tmp1
	.import     popax, __oserror

.proc   _dio_set_sectsize

	sta     tmp1                ; save sector size
	stx     tmp1+1 

	jsr     popax
	sta     ptr1
	stx     ptr1+1              ; pointer to dhandle

	ldy     #1                  ; offset into sst_table
	lda     tmp1
	sta     (ptr1),y
	iny
	lda     tmp1+1
	sta     (ptr1),y

	lda     #0
	sta     __oserror
	rts

.endproc

Am I doing something wrong here?  I don't seem to be having much luck with it.



----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-10-31 21:25:31 CET