diff --git a/libsrc/telestrat/ch376.s b/libsrc/telestrat/ch376.s index fbfa16017..49aefad92 100644 --- a/libsrc/telestrat/ch376.s +++ b/libsrc/telestrat/ch376.s @@ -29,49 +29,49 @@ CH376_USB_INT_SUCCESS = $14 CH376_USB_INT_CONNECT = $15 CH376_USB_INT_DISCONNECT = $16 CH376_USB_INT_BUF_OVER = $17 -CH376_USB_INT_USB_READY = $18 -CH376_USB_INT_DISK_READ = $1D +CH376_USB_INT_USB_READY = $18 +CH376_USB_INT_DISK_READ = $1D CH376_USB_INT_DISK_WRITE = $1E CH376_USB_INT_DISK_ERR = $1F -CH376_ERR_OPEN_DIR = $41 -CH376_ERR_MISS_FILE = $42 +CH376_ERR_OPEN_DIR = $41 +CH376_ERR_MISS_FILE = $42 CH376_ERR_FOUND_NAME = $43 CH376_ERR_DISK_DISCON = $82 CH376_ERR_LARGE_SECTOR = $84 CH376_ERR_TYPE_ERROR = $92 -CH376_ERR_BPB_ERROR = $A1 -CH376_ERR_DISK_FULL = $B1 -CH376_ERR_FDT_OVER = $B2 +CH376_ERR_BPB_ERROR = $A1 +CH376_ERR_DISK_FULL = $B1 +CH376_ERR_FDT_OVER = $B2 CH376_ERR_FILE_CLOSE = $B4 -CH376_GET_IC_VER = $01 -CH376_SET_BAUDRATE = $02 +CH376_GET_IC_VER = $01 +CH376_SET_BAUDRATE = $02 CH376_GET_ENTER_SLEEP = $03 -CH376_RESET_ALL = $05 -CH376_CHECK_EXIST = $06 +CH376_RESET_ALL = $05 +CH376_CHECK_EXIST = $06 CH376_GET_FILE_SIZE = $0C CH376_SET_USB_MODE = $15 CH376_GET_STATUS = $22 CH376_RD_USB_DATA0 = $27 -CH376_CMD_WR_REQ_DATA = $2D -CH376_SET_FILE_NAME = $2F +CH376_CMD_WR_REQ_DATA = $2D +CH376_SET_FILE_NAME = $2F CH376_DISK_CONNECT = $30 ; check the disk connection status -CH376_DISK_MOUNT = $31 -CH376_FILE_OPEN = $32 -CH376_FILE_ENUM_GO = $33 -CH376_FILE_CREATE = $34 +CH376_DISK_MOUNT = $31 +CH376_FILE_OPEN = $32 +CH376_FILE_ENUM_GO = $33 +CH376_FILE_CREATE = $34 CH376_FILE_CLOSE = $36 -CH376_BYTE_LOCATE = $39 -CH376_BYTE_READ = $3A -CH376_BYTE_RD_GO = $3B -CH376_BYTE_WRITE = $3C -CH376_BYTE_WR_GO = $3D -CH376_DISK_CAPACITY = $3E -CH376_DISK_RD_GO = $55 +CH376_BYTE_LOCATE = $39 +CH376_BYTE_READ = $3A +CH376_BYTE_RD_GO = $3B +CH376_BYTE_WRITE = $3C +CH376_BYTE_WR_GO = $3D +CH376_DISK_CAPACITY = $3E +CH376_DISK_RD_GO = $55 .proc _ch376_file_close lda #CH376_FILE_CLOSE diff --git a/libsrc/telestrat/close.s b/libsrc/telestrat/close.s index 881d0897f..240ebb063 100644 --- a/libsrc/telestrat/close.s +++ b/libsrc/telestrat/close.s @@ -2,9 +2,9 @@ .export _close - .import addysp,popax + .import addysp,popax - .include "zeropage.inc" + .include "zeropage.inc" .include "telestrat.inc" .include "errno.inc" .include "fcntl.inc" diff --git a/libsrc/telestrat/graphics.s b/libsrc/telestrat/graphics.s index 9984036bb..e0b002d3c 100644 --- a/libsrc/telestrat/graphics.s +++ b/libsrc/telestrat/graphics.s @@ -4,7 +4,7 @@ .include "zeropage.inc" .include "telestrat.inc" - .import popa + .import popa .proc _paper diff --git a/libsrc/telestrat/mainargs.s b/libsrc/telestrat/mainargs.s index b41e2a96d..fa388cbfa 100644 --- a/libsrc/telestrat/mainargs.s +++ b/libsrc/telestrat/mainargs.s @@ -24,8 +24,8 @@ initmainargs: ldx #0 ; Limit the length L0: lda BUFEDT,x - beq L3 - cmp #' ' + beq L3 + cmp #' ' bne L1 lda #0 beq L3 @@ -35,7 +35,7 @@ L1: sta name,x bne L0 lda #0 L3: - sta name,x + sta name,x inc __argc ; argc always is equal to, at least, 1 diff --git a/libsrc/telestrat/open.s b/libsrc/telestrat/open.s index 9455855da..b3b390003 100644 --- a/libsrc/telestrat/open.s +++ b/libsrc/telestrat/open.s @@ -1,33 +1,32 @@ - .export _open - .import addysp,popax - .importzp sp,tmp2,tmp3,tmp1 + .export _open + .import addysp,popax + .importzp sp,tmp2,tmp3,tmp1 - .include "telestrat.inc" - .include "errno.inc" - .include "fcntl.inc" + .include "telestrat.inc" + .include "errno.inc" + .include "fcntl.inc" ; int open (const char* name, int flags, ...); /* May take a mode argument */ .proc _open ; Throw away any additional parameters passed through the ellipsis - dey ; Parm count < 4 shouldn't be needed to be... - dey ; ...checked (it generates a c compiler warning) - dey - dey - beq parmok ; Branch if parameter count ok - jsr addysp ; Fix stack, throw away unused parameters + dey ; Parm count < 4 shouldn't be needed to be... + dey ; ...checked (it generates a c compiler warning) + dey + dey + beq parmok ; Branch if parameter count ok + jsr addysp ; Fix stack, throw away unused parameters ; Parameters ok. Pop the flags and save them into tmp3 parmok: jsr popax ; Get flagss - sta tmp3 ; save flags + sta tmp3 ; save flags ; Get the filename from stack and parse it. Bail out if is not ok - - jsr popax ; Get name - ldy tmp3 ; Get flags again - BRK_TELEMON XOPEN ; launch primitive ROM - rts + jsr popax ; Get name + ldy tmp3 ; Get flags again + BRK_TELEMON XOPEN ; launch primitive ROM + rts .endproc \ No newline at end of file