remove dangling spaces

This commit is contained in:
mrdudz 2022-04-17 16:06:22 +02:00
parent 5276033be1
commit c6f23eefc8
212 changed files with 432 additions and 432 deletions

View File

@ -18,7 +18,7 @@ typerr: lda #$4A ; "Incompatible file format"
; Cleanup name ; Cleanup name
oserr: jsr popname ; Preserves A oserr: jsr popname ; Preserves A
; Set __oserror ; Set __oserror
jmp __mappederrno jmp __mappederrno

View File

@ -2,7 +2,7 @@
; Oliver Schmidt, 10.9.2009 ; Oliver Schmidt, 10.9.2009
; ;
; Default ProDOS 8 I/O buffer management ; Default ProDOS 8 I/O buffer management
; ;
.export iobuf_alloc, iobuf_free .export iobuf_alloc, iobuf_free
.import _posix_memalign, _free .import _posix_memalign, _free

View File

@ -8,13 +8,13 @@
; ;
.export _mouse_def_callbacks .export _mouse_def_callbacks
.include "apple2.inc" .include "apple2.inc"
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.bss .bss
backup: .res 1 backup: .res 1
visible:.res 1 visible:.res 1

View File

@ -152,7 +152,7 @@ next: inc ptr1+1
sta xparam+1 sta xparam+1
sta jump+2 sta jump+2
; Disable interrupts now because setting the slot number makes ; Disable interrupts now because setting the slot number makes
; the IRQ handler (maybe called due to some non-mouse IRQ) try ; the IRQ handler (maybe called due to some non-mouse IRQ) try
; calling the firmware which isn't correctly set up yet ; calling the firmware which isn't correctly set up yet
sei sei
@ -167,7 +167,7 @@ next: inc ptr1+1
asl asl
asl asl
sta yparam+1 sta yparam+1
; The AppleMouse II Card needs the ROM switched in ; The AppleMouse II Card needs the ROM switched in
; to be able to detect an Apple //e and use RDVBL ; to be able to detect an Apple //e and use RDVBL
bit $C082 bit $C082
@ -175,7 +175,7 @@ next: inc ptr1+1
; Reset mouse hardware ; Reset mouse hardware
ldx #INITMOUSE ldx #INITMOUSE
jsr firmware jsr firmware
; Switch in LC bank 2 for R/O ; Switch in LC bank 2 for R/O
bit $C080 bit $C080
@ -236,12 +236,12 @@ UNINSTALL:
SETBOX: SETBOX:
sta ptr1 sta ptr1
stx ptr1+1 stx ptr1+1
; Set x clamps ; Set x clamps
ldx #$00 ldx #$00
ldy #MOUSE_BOX::MINX ldy #MOUSE_BOX::MINX
jsr :+ jsr :+
; Set y clamps ; Set y clamps
ldx #$01 ldx #$01
ldy #MOUSE_BOX::MINY ldy #MOUSE_BOX::MINY
@ -257,7 +257,7 @@ SETBOX:
sta pos1_lo sta pos1_lo
iny iny
lda (ptr1),y lda (ptr1),y
sta box,y sta box,y
sta pos1_hi sta pos1_hi
; Skip one word ; Skip one word
@ -267,11 +267,11 @@ SETBOX:
; Set high clamp ; Set high clamp
iny iny
lda (ptr1),y lda (ptr1),y
sta box,y sta box,y
sta pos2_lo sta pos2_lo
iny iny
lda (ptr1),y lda (ptr1),y
sta box,y sta box,y
sta pos2_hi sta pos2_hi
txa txa

View File

@ -57,7 +57,7 @@ extern char _cwd[FILENAME_MAX];
DIR* __fastcall__ opendir (register const char* name) DIR* __fastcall__ opendir (register const char* name)
{ {
register DIR* dir; register DIR* dir;

View File

@ -111,4 +111,4 @@ errno: jmp __directerrno
; Set __oserror ; Set __oserror
oserr: jmp __mappederrno oserr: jmp __mappederrno

View File

@ -63,7 +63,7 @@ L1: lda #<brk_handler ; Set the break vector to our routine
lda #$00 lda #$00
sta oldvec ; Clear the old vector sta oldvec ; Clear the old vector
stx oldvec+1 stx oldvec+1
@L9: rts @L9: rts
.endproc .endproc

View File

@ -17,7 +17,7 @@ _cclearxy:
_cclear: _cclear:
cmp #0 ; Is the length zero? cmp #0 ; Is the length zero?
beq L9 ; Jump if done beq L9 ; Jump if done
sta tmp1 sta tmp1
L1: lda #0 ; Blank - screen code L1: lda #0 ; Blank - screen code
jsr cputdirect ; Direct output jsr cputdirect ; Direct output
dec tmp1 dec tmp1

View File

@ -12,7 +12,7 @@
.include "ctypetable.inc" .include "ctypetable.inc"
.export __ctypeidx .export __ctypeidx
; The tables are readonly, put them into the rodata segment ; The tables are readonly, put them into the rodata segment
.rodata .rodata

View File

@ -5,7 +5,7 @@
; void cvline (unsigned char length); ; void cvline (unsigned char length);
; ;
.include "atari.inc" .include "atari.inc"
.export _cvlinexy, _cvline .export _cvlinexy, _cvline
.import gotoxy, putchar, setcursor .import gotoxy, putchar, setcursor
.importzp tmp1 .importzp tmp1

View File

@ -137,7 +137,7 @@ _dio_open:
iny iny
lda #1 lda #1
finish: sta (ptr2),y ; set default sector size finish: sta (ptr2),y ; set default sector size
fini2: lda ptr2 fini2: lda ptr2
ldx ptr2+1 ldx ptr2+1
rts rts

View File

@ -12,7 +12,7 @@
.proc _dio_query_sectsize .proc _dio_query_sectsize
sta ptr1 ; handle sta ptr1 ; handle
stx ptr1+1 stx ptr1+1
lda #0 lda #0
sta __oserror sta __oserror

View File

@ -12,7 +12,7 @@
.ifdef __ATARIXL__ .ifdef __ATARIXL__
_doesclrscrafterexit = return1 ; the c65 runtime always clears the screen at program termination _doesclrscrafterexit = return1 ; the c65 runtime always clears the screen at program termination
.else .else
_doesclrscrafterexit: _doesclrscrafterexit:
jsr __is_cmdline_dos ; currently (unless a DOS behaving differently is popping up) jsr __is_cmdline_dos ; currently (unless a DOS behaving differently is popping up)
eor #$01 ; we can get by with the inverse of __is_cmdline_dos eor #$01 ; we can get by with the inverse of __is_cmdline_dos

View File

@ -11,7 +11,7 @@
; Bit 2: bank control ; Bit 2: bank control
; Bit 1: BASIC on/off ; Bit 1: BASIC on/off
; Bit 0: OS RAM on/off ; Bit 0: OS RAM on/off
; ;
; Masks: %11100011 $E3 Bank 0 ; Masks: %11100011 $E3 Bank 0
; %11100111 $E7 Bank 1 ; %11100111 $E7 Bank 1
; %11101011 $EB Bank 2 ; %11101011 $EB Bank 2
@ -67,7 +67,7 @@
; Constants ; Constants
BANK = $4000 ; bank window BANK = $4000 ; bank window
STACK = $0100 ; stack location STACK = $0100 ; stack location
PAGES = 256 ; 4 x 16k banks PAGES = 256 ; 4 x 16k banks
@ -93,17 +93,17 @@ stacktest: sei
@2: sta $4000 ; restore @2: sta $4000 ; restore
cli cli
rts rts
stacktest_end: stacktest_end:
stackcopy: sei ; disable interrupts stackcopy: sei ; disable interrupts
@1: dex ; pre-decrement (full page x=0) @1: dex ; pre-decrement (full page x=0)
ldy #$FF ; this will be replaced STACK+3 ldy #$FF ; this will be replaced STACK+3
sty $D301 ; set bank sty $D301 ; set bank
lda $FF00,x ; address to copy from STACK+8,+9 lda $FF00,x ; address to copy from STACK+8,+9
ldy #$FF ; this will be replaced STACK+11 ldy #$FF ; this will be replaced STACK+11
sty $D301 sty $D301
sta $FF00,x ; address to copy to STACK+16,+17 sta $FF00,x ; address to copy to STACK+16,+17
cpx #0 cpx #0
bne @1 bne @1
ldy #$FF ; portb_save STACK+23 ldy #$FF ; portb_save STACK+23
sty $D301 sty $D301
@ -122,7 +122,7 @@ stackcopy_byte: sei
sty $D301 sty $D301
cli cli
rts rts
stackcopy_byte_end: stackcopy_byte_end:
.data .data
@ -186,14 +186,14 @@ setpage:
INSTALL: INSTALL:
lda $D301 ; save state of portb lda $D301 ; save state of portb
sta portb_save sta portb_save
tay tay
jsr install_test ; doesn't touch Y jsr install_test ; doesn't touch Y
sty STACK+13 sty STACK+13
lda $4000 ; test for extended memory lda $4000 ; test for extended memory
jsr STACK jsr STACK
bcs @1 bcs @1
lda #EM_ERR_OK lda #EM_ERR_OK
rts rts
@1: lda #EM_ERR_NO_DEVICE @1: lda #EM_ERR_NO_DEVICE
@ -242,7 +242,7 @@ MAP: jsr setpage ; extract the bank/page
lda banks,x lda banks,x
sta STACK+3 ; set bank to copy from sta STACK+3 ; set bank to copy from
; lda ptr1 ; lda ptr1
; sta STACK+8 ; sta STACK+8
lda ptr1+1 lda ptr1+1
sta STACK+9 ; set copy from address sta STACK+9 ; set copy from address
lda portb_save lda portb_save
@ -251,10 +251,10 @@ MAP: jsr setpage ; extract the bank/page
lda ptr2 lda ptr2
sta STACK+16 sta STACK+16
lda ptr2+1 lda ptr2+1
sta STACK+17 ; set copy to address sta STACK+17 ; set copy to address
ldx #0 ; full page copy ldx #0 ; full page copy
jsr STACK ; do the copy! jsr STACK ; do the copy!
; Return the memory window ; Return the memory window
@ -298,7 +298,7 @@ COMMIT: lda curpage ; Get the current page
sta STACK+3 ; set bank to copy from sta STACK+3 ; set bank to copy from
sta STACK+23 ; set final portb restore sta STACK+23 ; set final portb restore
lda ptr1 lda ptr1
sta STACK+8 sta STACK+8
lda ptr1+1 lda ptr1+1
sta STACK+9 ; set copy from address sta STACK+9 ; set copy from address
ldx curbank ldx curbank
@ -307,10 +307,10 @@ COMMIT: lda curpage ; Get the current page
;lda ptr2 ;lda ptr2
;sta STACK+16 ;sta STACK+16
lda ptr2+1 lda ptr2+1
sta STACK+17 ; set copy to address sta STACK+17 ; set copy to address
ldx #0 ; full page copy ldx #0 ; full page copy
jsr STACK ; do the copy! jsr STACK ; do the copy!
commit_done: commit_done:
rts rts
@ -329,7 +329,7 @@ COPYFROM:
ldy #EM_COPY::OFFS ldy #EM_COPY::OFFS
lda (ptr3),y lda (ptr3),y
sta STACK+7 ; offset goes into BANK low sta STACK+7 ; offset goes into BANK low
ldy #EM_COPY::PAGE ldy #EM_COPY::PAGE
lda (ptr3),y lda (ptr3),y
@ -357,9 +357,9 @@ COPYFROM:
add #>BANK ; add to BANK address add #>BANK ; add to BANK address
sta STACK+8 ; current page in bank sta STACK+8 ; current page in bank
ldx curbank ldx curbank
lda banks,x lda banks,x
sta STACK+2 ; set bank in stack sta STACK+2 ; set bank in stack
lda portb_save lda portb_save
sta STACK+10 ; set bank restore in stack sta STACK+10 ; set bank restore in stack
sta STACK+18 ; set final restore too sta STACK+18 ; set final restore too
@ -399,7 +399,7 @@ copyfrom_copy:
bne @3 bne @3
inc STACK+16 inc STACK+16
@3: jmp copyfrom_copy ; copy another byte @3: jmp copyfrom_copy ; copy another byte
done: done:
rts rts
@ -418,7 +418,7 @@ COPYTO:
ldy #EM_COPY::OFFS ldy #EM_COPY::OFFS
lda (ptr3),y lda (ptr3),y
sta STACK+15 ; offset goes into BANK low sta STACK+15 ; offset goes into BANK low
ldy #EM_COPY::PAGE ldy #EM_COPY::PAGE
lda (ptr3),y lda (ptr3),y
@ -446,9 +446,9 @@ COPYTO:
add #>BANK ; add to BANK address add #>BANK ; add to BANK address
sta STACK+16 ; current page in bank sta STACK+16 ; current page in bank
ldx curbank ldx curbank
lda banks,x lda banks,x
sta STACK+10 ; set bank in stack sta STACK+10 ; set bank in stack
lda portb_save lda portb_save
sta STACK+2 ; set bank restore in stack sta STACK+2 ; set bank restore in stack
sta STACK+18 ; set final restore too sta STACK+18 ; set final restore too
@ -488,5 +488,5 @@ copyto_copy:
bne @3 bne @3
inc STACK+8 inc STACK+8
@3: jmp copyto_copy ; copy another byte @3: jmp copyto_copy ; copy another byte

View File

@ -74,7 +74,7 @@ prep:
jsr getcursor ; Get character at cursor position jsr getcursor ; Get character at cursor position
cmp #mouse_txt_char ; "mouse" character cmp #mouse_txt_char ; "mouse" character
bne overwr ; no, probably program has overwritten it bne overwr ; no, probably program has overwritten it
lda backup ; lda backup ;
jmp setcursor ; Draw character jmp setcursor ; Draw character
overwr: sta backup overwr: sta backup
rts rts

View File

@ -10,7 +10,7 @@
.include "atari.inc" .include "atari.inc"
__randomize: __randomize:
ldx VCOUNT ; Use vertical line counter as high byte ldx VCOUNT ; Use vertical line counter as high byte
lda RTCLOK+2 ; Use clock as low byte lda RTCLOK+2 ; Use clock as low byte
jmp _srand ; Initialize generator jmp _srand ; Initialize generator

View File

@ -4,7 +4,7 @@
; unsigned char revers (unsigned char onoff); ; unsigned char revers (unsigned char onoff);
; ;
.include "atari.inc" .include "atari.inc"
.export _revers .export _revers
.export _revflag .export _revflag

View File

@ -737,9 +737,9 @@ fn_cont:jsr get_fn_len
lda #0 lda #0
sta ICBLH,x sta ICBLH,x
jsr chk_CIO_buf jsr chk_CIO_buf
pla pla
sta ICBLH,x sta ICBLH,x
pla pla
sta ICBLL,x sta ICBLL,x
pla pla
tay tay
@ -756,7 +756,7 @@ chk_CIO_buf:
lda ICBAH,x lda ICBAH,x
cmp #$c0 cmp #$c0
bcc @cont bcc @cont
@ret: @ret:
.ifdef DEBUG .ifdef DEBUG
jsr CIO_buf_noti jsr CIO_buf_noti
.endif .endif

View File

@ -93,7 +93,7 @@ sdnobw: lda DOS+1 ; SD version
ldy #31 ; offset for OSRMFLG ldy #31 ; offset for OSRMFLG
lda (DOSVEC),y ; get OSRMFLG lda (DOSVEC),y ; get OSRMFLG
bne sdcrts1 bne sdcrts1
sdcrts0:clc sdcrts0:clc
rts rts
sdcrts1:sec sdcrts1:sec

View File

@ -7,7 +7,7 @@
; It calculates the value to put into RAMTOP for a subsequent ; It calculates the value to put into RAMTOP for a subsequent
; "GRAPHICS 0" call, and the lowest address which will be used ; "GRAPHICS 0" call, and the lowest address which will be used
; by the screen memory afterwards. ; by the screen memory afterwards.
; ;
; inputs: ; inputs:
; __STARTADDRESS__ - load address of the program ; __STARTADDRESS__ - load address of the program
; outputs: ; outputs:

View File

@ -74,7 +74,7 @@ conio_color: .res 1
dlist: .repeat 3 dlist: .repeat 3
.byte DL_BLK8 .byte DL_BLK8
.endrepeat .endrepeat
.byte DL_CHR20x8x2 | DL_LMS .byte DL_CHR20x8x2 | DL_LMS
.word SCREEN_BUF .word SCREEN_BUF

View File

@ -5,7 +5,7 @@
; void cvline (unsigned char length); ; void cvline (unsigned char length);
; ;
.include "atari5200.inc" .include "atari5200.inc"
.export _cvlinexy, _cvline .export _cvlinexy, _cvline
.import gotoxy, putchar .import gotoxy, putchar
.importzp tmp1 .importzp tmp1

View File

@ -74,7 +74,7 @@ conio_color: .res 1
dlist: .repeat 3 dlist: .repeat 3
.byte DL_BLK8 .byte DL_BLK8
.endrepeat .endrepeat
.byte DL_CHR20x16x2 | DL_LMS .byte DL_CHR20x16x2 | DL_LMS
.word SCREEN_BUF .word SCREEN_BUF

View File

@ -44,7 +44,7 @@
; ;
INSTALL: INSTALL:
lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in lda #$04 ; enable POT input from the joystick ports, see section "GTIA" in
sta CONSOL ; http://www.atarimuseum.com/videogames/consoles/5200/conv_to_5200.html sta CONSOL ; http://www.atarimuseum.com/videogames/consoles/5200/conv_to_5200.html
lda #JOY_ERR_OK lda #JOY_ERR_OK
ldx #0 ldx #0

View File

@ -10,7 +10,7 @@
.include "atari5200.inc" .include "atari5200.inc"
__randomize: __randomize:
ldx VCOUNT ; Use vertical line counter as high byte ldx VCOUNT ; Use vertical line counter as high byte
lda RTCLOK+1 ; Use clock as low byte lda RTCLOK+1 ; Use clock as low byte
jmp _srand ; Initialize generator jmp _srand ; Initialize generator

View File

@ -9,16 +9,16 @@ Y2K LDY #$00 ; Copy BIOS opening screen to RAM
CPX #$E8 ; Is this a 4 port? CPX #$E8 ; Is this a 4 port?
BNE Y2K0 ; Jump if not BNE Y2K0 ; Jump if not
LDA #$42 ; Yes, 4 port system LDA #$42 ; Yes, 4 port system
Y2K0 STA TEMPL Y2K0 STA TEMPL
Y2K1 LDA (TEMPL),Y Y2K1 LDA (TEMPL),Y
STA $0600,Y STA $0600,Y
INY INY
BNE Y2K1 BNE Y2K1
LDY #$50 LDY #$50
INC TEMPH INC TEMPH
Y2K2 LDA (TEMPL),Y Y2K2 LDA (TEMPL),Y
STA $0700,Y STA $0700,Y
DEY DEY
BPL Y2K2 BPL Y2K2
LDA #$D4 ; Point to copyright string LDA #$D4 ; Point to copyright string
STA $0724 STA $0724
@ -26,8 +26,8 @@ Y2K2 LDA (TEMPL),Y
STA $0725 STA $0725
LDX #$0B ; Store NOP's @ end LDX #$0B ; Store NOP's @ end
LDA #$EA LDA #$EA
Y2K3 STA $0732,X Y2K3 STA $0732,X
DEX DEX
BPL Y2K3 BPL Y2K3
LDA #$60 ; Store RTS opcode @ end LDA #$60 ; Store RTS opcode @ end
STA $0750 STA $0750

View File

@ -19,7 +19,7 @@ start:
sei ; Initialize 6502 sei ; Initialize 6502
cld cld
lda #$07 ; Lock machine in 7800 mode lda #$07 ; Lock machine in 7800 mode
sta INPTCTRL sta INPTCTRL
lda #$7f ; DMA off lda #$7f ; DMA off
sta CTRL sta CTRL
ldx #0 ; OFFSET must always be 0 ldx #0 ; OFFSET must always be 0
@ -28,7 +28,7 @@ start:
dex ; Stack pointer = $ff dex ; Stack pointer = $ff
txs txs
; Set up parameter stack ; Set up parameter stack
lda #<(__RAM3_START__ + __RAM3_SIZE__) lda #<(__RAM3_START__ + __RAM3_SIZE__)
sta sp sta sp
lda #>(__RAM3_START__ + __RAM3_SIZE__) lda #>(__RAM3_START__ + __RAM3_SIZE__)
@ -48,7 +48,7 @@ _exit:
jsr donelib jsr donelib
jmp start jmp start
NMIHandler: NMIHandler:
inc _zonecounter inc _zonecounter
jmp IRQStub jmp IRQStub

View File

@ -85,7 +85,7 @@ COUNT:
rts rts
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; READ: Read a particular joystick passed in A for 2 fire buttons. ; READ: Read a particular joystick passed in A for 2 fire buttons.
readbuttons: readbuttons:
; Y has joystick of interest 0/1 ; Y has joystick of interest 0/1

View File

@ -6,7 +6,7 @@
; ;
.export _cclearxy, _cclear .export _cclearxy, _cclear
.import setscrptr .import setscrptr
.import rvs .import rvs
.import popax .import popax
.importzp ptr2 .importzp ptr2
@ -25,7 +25,7 @@ _cclear:
tax ; Is the length zero? tax ; Is the length zero?
beq @L9 ; Jump if done beq @L9 ; Jump if done
jsr setscrptr ; Set ptr2 to screen, won't use X jsr setscrptr ; Set ptr2 to screen, won't use X
lda #' ' lda #' '
ora rvs ora rvs
@L1: sta (ptr2),y ; Write one char @L1: sta (ptr2),y ; Write one char
iny ; Next char iny ; Next char

View File

@ -119,7 +119,7 @@ __ctypeidx:
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 186/ba ___________, 187/bb ___________ ct_mix CT_NONE_IDX, CT_NONE_IDX ; 186/ba ___________, 187/bb ___________
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 188/bc ___________, 189/bd ___________ ct_mix CT_NONE_IDX, CT_NONE_IDX ; 188/bc ___________, 189/bd ___________
ct_mix CT_NONE_IDX, CT_NONE_IDX ; 190/be ___________, 191/bf ___________ ct_mix CT_NONE_IDX, CT_NONE_IDX ; 190/be ___________, 191/bf ___________
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 192/c0 ___________, 193/c1 ___________ ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 192/c0 ___________, 193/c1 ___________
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 194/c2 ___________, 195/c3 ___________ ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 194/c2 ___________, 195/c3 ___________
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 196/c4 ___________, 197/c5 ___________ ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 196/c4 ___________, 197/c5 ___________

View File

@ -73,7 +73,7 @@ INSTALL:
lda #$ff lda #$ff
sta curpage sta curpage
sta curpage+1 sta curpage+1
; do test for VDC presence here??? ; do test for VDC presence here???
ldx #VDC_CSET ; determine size of RAM... ldx #VDC_CSET ; determine size of RAM...
jsr vdcgetreg jsr vdcgetreg
@ -97,29 +97,29 @@ INSTALL:
jsr vdcputbyte ; restore original value of test byte jsr vdcputbyte ; restore original value of test byte
ldx #0 ; prepare x with hi of default pagecount ldx #0 ; prepare x with hi of default pagecount
lda ptr1 ; do bytes match? lda ptr1 ; do bytes match?
cmp ptr1+1 cmp ptr1+1
bne @have64k bne @have64k
lda ptr2 lda ptr2
cmp ptr2+1 cmp ptr2+1
bne @have64k bne @have64k
lda #64 ; assumes x = 0, here -> p.c = 64 lda #64 ; assumes x = 0, here -> p.c = 64
bne @setpagecnt bne @setpagecnt
@have64k: @have64k:
txa ; assumes x = 0, here txa ; assumes x = 0, here
inx ; so that a/x becomes 0/1 -> p.c. = 256 inx ; so that a/x becomes 0/1 -> p.c. = 256
@setpagecnt: @setpagecnt:
sta pagecount sta pagecount
stx pagecount+1 stx pagecount+1
txa txa
bne @keep64kBit bne @keep64kBit
ldx #VDC_CSET ; restore 16/64k flag ldx #VDC_CSET ; restore 16/64k flag
lda vdc_cset_save lda vdc_cset_save
jsr vdcputreg jsr vdcputreg
@keep64kBit: @keep64kBit:
lda #<EM_ERR_OK lda #<EM_ERR_OK
ldx #>EM_ERR_OK ldx #>EM_ERR_OK

View File

@ -12,7 +12,7 @@
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; Data. We define a fixed utsname struct here and just copy it. ; Data. We define a fixed utsname struct here and just copy it.
.rodata .rodata
utsdata: utsdata:

View File

@ -12,9 +12,9 @@
/* saves a memory area from start to end-1 to a file. /* saves a memory area from start to end-1 to a file.
*/ */
unsigned char __fastcall__ cbm_save (const char* name, unsigned char __fastcall__ cbm_save (const char* name,
unsigned char device, unsigned char device,
const void* data, const void* data,
unsigned int size) unsigned int size)
{ {
cbm_k_setlfs(0, device, 0); cbm_k_setlfs(0, device, 0);

View File

@ -13,7 +13,7 @@
.include "ctypetable.inc" .include "ctypetable.inc"
.export __ctypeidx .export __ctypeidx
; The tables are readonly, put them into the rodata segment ; The tables are readonly, put them into the rodata segment
.rodata .rodata

View File

@ -38,7 +38,7 @@ DIR* __fastcall__ opendir (register const char* name)
d.fd = open (d.name, O_RDONLY); d.fd = open (d.name, O_RDONLY);
if (d.fd >= 0) { if (d.fd >= 0) {
/* Skip the load address */ /* Skip the load address */
if (_dirread (&d, buf, sizeof (buf))) { if (_dirread (&d, buf, sizeof (buf))) {
/* Allocate memory for the DIR structure returned */ /* Allocate memory for the DIR structure returned */

View File

@ -9,7 +9,7 @@
.import RVS: zp .import RVS: zp
.include "cbm610.inc" .include "cbm610.inc"
.proc _revers .proc _revers

View File

@ -39,4 +39,4 @@ initheap:
sta __heapend+1 sta __heapend+1
rts rts

View File

@ -6,7 +6,7 @@
; size_t _heapmaxavail (void); ; size_t _heapmaxavail (void);
; ;
; ;
.importzp ptr1, ptr2 .importzp ptr1, ptr2
.export __heapmaxavail .export __heapmaxavail

View File

@ -1,9 +1,9 @@
/* /*
** Ullrich von Bassewitz, 2012-11-26 ** Ullrich von Bassewitz, 2012-11-26
** **
** Minimum value of a long. Is used in ascii conversions, since this value ** Minimum value of a long. Is used in ascii conversions, since this value
** has no positive counterpart than can be represented in 32 bits. In C, ** has no positive counterpart than can be represented in 32 bits. In C,
** since the compiler will convert to the correct character set for the ** since the compiler will convert to the correct character set for the
** target platform. ** target platform.
*/ */

View File

@ -2,7 +2,7 @@
; Ullrich von Bassewitz, 2004-05-13 ; Ullrich von Bassewitz, 2004-05-13
; ;
; __seterrno: Will set __errno to the value in A and return zero in A. Other ; __seterrno: Will set __errno to the value in A and return zero in A. Other
; registers aren't changed. The function is C callable, but ; registers aren't changed. The function is C callable, but
; currently only called from asm code. ; currently only called from asm code.
; ;

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>

View File

@ -9,7 +9,7 @@
; ;
; ctypemask(int c) ; ctypemask(int c)
; ;
; converts a character to test via the is*-functions to the matching ctype-masks ; converts a character to test via the is*-functions to the matching ctype-masks
; If c is out of the 8-bit range, the function returns with carry set and accu cleared. ; If c is out of the 8-bit range, the function returns with carry set and accu cleared.
; Return value is in accu and x has to be always clear when returning ; Return value is in accu and x has to be always clear when returning
; (makes calling code shorter)! ; (makes calling code shorter)!

View File

@ -18,10 +18,10 @@
.importzp sreg, ptr1, tmp1 .importzp sreg, ptr1, tmp1
_div: jsr tosdivax ; Division-operator does most of the work _div: jsr tosdivax ; Division-operator does most of the work
ldy sreg ; low byte remainder from sreg ldy sreg ; low byte remainder from sreg
sta sreg ; store low byte quotient to sreg sta sreg ; store low byte quotient to sreg
lda sreg+1 ; high byte remainder from sreg lda sreg+1 ; high byte remainder from sreg
stx sreg+1 ; store high byte quotient to sreg stx sreg+1 ; store high byte quotient to sreg

View File

@ -7,6 +7,6 @@
; ;
.export _doesclrscrafterexit .export _doesclrscrafterexit
.import return0 .import return0
_doesclrscrafterexit = return0 _doesclrscrafterexit = return0

View File

@ -161,7 +161,7 @@
bne @L8 bne @L8
; Error in read. Set the stream error flag and bail out. errno has already ; Error in read. Set the stream error flag and bail out. errno has already
; been set by read(). On entry to label @L7, X must be zero. ; been set by read(). On entry to label @L7, X must be zero.
inx ; X = 0 inx ; X = 0
lda #_FERROR lda #_FERROR

View File

@ -274,7 +274,7 @@ _free: sta ptr2
; } ; }
; } ; }
; ;
; ;
; On entry, ptr2 must contain a pointer to the block, which must be at least ; On entry, ptr2 must contain a pointer to the block, which must be at least
; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the ; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the
; block. ; block.

View File

@ -21,4 +21,4 @@ int __fastcall__ fsetpos (FILE* f, const fpos_t *pos)
return fseek (f, (fpos_t)*pos, SEEK_SET); return fseek (f, (fpos_t)*pos, SEEK_SET);
} }

View File

@ -19,7 +19,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Code ; Code
.proc _fwrite .proc _fwrite
; Save file and place it into ptr1 ; Save file and place it into ptr1

View File

@ -53,7 +53,7 @@ overflow:
lda #<ERANGE lda #<ERANGE
jsr __seterrno ; Returns 0 in A jsr __seterrno ; Returns 0 in A
tax ; Return zero tax ; Return zero
rts rts
; Success, return buf ; Success, return buf

View File

@ -56,7 +56,7 @@ L1: lda __longminstr,y ; copy -2147483648
dey dey
bpl L1 bpl L1
jmp L10 jmp L10
; Check if the value is negative. If so, write a - sign and negate the ; Check if the value is negative. If so, write a - sign and negate the
; number. ; number.
@ -66,7 +66,7 @@ L2: txa ; get high byte
.if (.cpu .bitand CPU_ISET_65SC02) .if (.cpu .bitand CPU_ISET_65SC02)
sta (ptr2) sta (ptr2)
.else .else
ldy #0 ldy #0
sta (ptr2),y ; store sign sta (ptr2),y ; store sign
.endif .endif
@ -79,7 +79,7 @@ L3: lda ptr1 ; negate val
ldx ptr1+1 ldx ptr1+1
jsr negeax jsr negeax
sta ptr1 sta ptr1
stx ptr1+1 stx ptr1+1
jmp ultoa jmp ultoa

View File

@ -67,7 +67,7 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0!
jsr popptr1 ; save src to ptr1 jsr popptr1 ; save src to ptr1
; save dest to ptr2 ; save dest to ptr2
iny ; Y=0 guaranteed by popptr1, we need '1' here... iny ; Y=0 guaranteed by popptr1, we need '1' here...
; (direct stack access is three cycles faster ; (direct stack access is three cycles faster
; (total cycle count with return)) ; (total cycle count with return))
lda (sp),y lda (sp),y

View File

@ -87,7 +87,7 @@ L3: dey
sta (ptr1),y ; set bytes in low sta (ptr1),y ; set bytes in low
sta (ptr2),y ; and high section sta (ptr2),y ; and high section
bne L3 ; flags still up to date from dey! bne L3 ; flags still up to date from dey!
leave: leave:
jmp popax ; Pop ptr and return as result jmp popax ; Pop ptr and return as result

View File

@ -9,7 +9,7 @@
; ;
; ;
; unsigned int __fastcall__ mul20(unsigned char value); ; unsigned int __fastcall__ mul20(unsigned char value);
; ;
; REMARKS: Function is defined to return with carry-flag cleared ; REMARKS: Function is defined to return with carry-flag cleared
@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5
inx ; yes, correct... inx ; yes, correct...
mul10: stx tmp4 ; continue with classic shifting... mul10: stx tmp4 ; continue with classic shifting...
asl a ; * 10 asl a ; * 10
rol tmp4 rol tmp4

View File

@ -9,7 +9,7 @@
; ;
; ;
; unsigned int __fastcall__ mul40(unsigned char value); ; unsigned int __fastcall__ mul40(unsigned char value);
; ;
; REMARKS: Function is defined to return with carry-flag cleared ; REMARKS: Function is defined to return with carry-flag cleared
@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5
inx ; yes, correct... inx ; yes, correct...
mul10: stx tmp4 ; continue with classic shifting... mul10: stx tmp4 ; continue with classic shifting...
asl a ; * 10 asl a ; * 10
rol tmp4 rol tmp4

View File

@ -185,4 +185,4 @@ error: jsr __seterrno
name: .addr 0 ; Pointer to name name: .addr 0 ; Pointer to name
newsize: .byte 0 ; New environment size newsize: .byte 0 ; New environment size

View File

@ -28,9 +28,9 @@ _raise:
sta jmpvec+1 sta jmpvec+1
lda sigtable+1,x lda sigtable+1,x
sta jmpvec+2 sta jmpvec+2
; Reset the signal handler to SIG_DFL (I don't like this because it may ; Reset the signal handler to SIG_DFL (I don't like this because it may
; introduce race conditions, but it's the simplest way to satisfy the ; introduce race conditions, but it's the simplest way to satisfy the
; standard). ; standard).
lda #<__sig_dfl lda #<__sig_dfl
@ -51,4 +51,4 @@ _raise:
invalidsig: invalidsig:
rts rts

View File

@ -22,4 +22,4 @@ void __fastcall__ rewind (FILE* f)
clearerr(f); clearerr(f);
} }

View File

@ -20,7 +20,7 @@ _strcspn:
sta tmp1 ; tmp1 = strlen of test chars sta tmp1 ; tmp1 = strlen of test chars
jsr popptr1 ; get and save s1 to ptr1 jsr popptr1 ; get and save s1 to ptr1
ldx #0 ; low counter byte ldx #0 ; low counter byte
stx tmp2 ; high counter byte stx tmp2 ; high counter byte

View File

@ -9,19 +9,19 @@
.import popax, popptr1 .import popax, popptr1
.importzp ptr1, ptr2, ptr3, tmp1, tmp2 .importzp ptr1, ptr2, ptr3, tmp1, tmp2
.macpack cpu .macpack cpu
_strncat: _strncat:
inx inx
stx tmp2 stx tmp2
tax tax
inx inx
stx tmp1 ; save count with each byte incremented separately stx tmp1 ; save count with each byte incremented separately
jsr popptr1 ; get src jsr popptr1 ; get src
jsr popax ; get dest jsr popax ; get dest
sta ptr3 ; remember for function return sta ptr3 ; remember for function return
stx ptr3+1 stx ptr3+1
stx ptr2+1 stx ptr2+1
tay ; low byte as offset in Y tay ; low byte as offset in Y
.if (.cpu .bitand ::CPU_ISET_65SC02) .if (.cpu .bitand ::CPU_ISET_65SC02)

View File

@ -16,8 +16,8 @@ _strrchr:
stx ptr1+1 stx ptr1+1
ldx #0 ; default function result is NULL, X is high byte... ldx #0 ; default function result is NULL, X is high byte...
stx tmp2 ; tmp2 is low-byte stx tmp2 ; tmp2 is low-byte
stx ptr1 ; low-byte of source string is in Y, so clear real one... stx ptr1 ; low-byte of source string is in Y, so clear real one...
testChar: testChar:
lda (ptr1),y ; get char lda (ptr1),y ; get char
beq finished ; jump if end of string beq finished ; jump if end of string

View File

@ -68,4 +68,4 @@ error: lda #EINVAL
rts rts
.endproc .endproc

View File

@ -30,7 +30,7 @@ _vsprintf:
ldy #2 ldy #2
jsr staxysp jsr staxysp
; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will ; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will
; cleanup the C stack ; cleanup the C stack
jmp vsnprintf jmp vsnprintf

View File

@ -8,7 +8,7 @@
.export _cputsxy, _cputs .export _cputsxy, _cputs
.import gotoxy, _cputc .import gotoxy, _cputc
.importzp ptr1, tmp1 .importzp ptr1, tmp1
_cputsxy: _cputsxy:
sta ptr1 ; Save s for later sta ptr1 ; Save s for later
stx ptr1+1 stx ptr1+1

View File

@ -10,7 +10,7 @@
.import screensize .import screensize
.importzp ptr1, ptr2 .importzp ptr1, ptr2
.macpack cpu .macpack cpu
.proc _screensize .proc _screensize
@ -29,7 +29,7 @@
sta (ptr2),y sta (ptr2),y
txa txa
sta (ptr1),y sta (ptr1),y
.endif .endif
rts rts
.endproc .endproc

View File

@ -3,13 +3,13 @@
;* ;*
.export screensize .export screensize
.include "creativision.inc" .include "creativision.inc"
.proc screensize .proc screensize
ldx #SCREEN_COLS ldx #SCREEN_COLS
ldy #SCREEN_ROWS ldy #SCREEN_ROWS
rts rts
.endproc .endproc

View File

@ -2,7 +2,7 @@
boxchars: boxchars:
; Vertical Line ; Vertical Line
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
@ -29,7 +29,7 @@ boxchars:
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
; Top Right ; Top Right
.byte $00 .byte $00
@ -39,7 +39,7 @@ boxchars:
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
.byte $18 .byte $18
; Bottom Left ; Bottom Left
.byte $18 .byte $18
@ -49,7 +49,7 @@ boxchars:
.byte $00 .byte $00
.byte $00 .byte $00
.byte $00 .byte $00
.byte $00 .byte $00
; Bottom Right ; Bottom Right
.byte $18 .byte $18
@ -59,4 +59,4 @@ boxchars:
.byte $00 .byte $00
.byte $00 .byte $00
.byte $00 .byte $00
.byte $00 .byte $00

View File

@ -57,5 +57,5 @@ MnemoTab2:
.byte $C4,$CA,$26,$48,$44,$44,$A2,$C8 .byte $C4,$CA,$26,$48,$44,$44,$A2,$C8

View File

@ -1579,12 +1579,12 @@ void DbgEntry (void)
case 'q': case 'q':
/* Quit program */ /* Quit program */
clrscr (); clrscr ();
/* Exit intentionally with error because one may /* Exit intentionally with error because one may
** say that DbgEntry is always abnormal. ** say that DbgEntry is always abnormal.
*/ */
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
} }
} }

View File

@ -77,7 +77,7 @@ disassret:
inx ; Adjust for opcode byte inx ; Adjust for opcode byte
txa txa
ldx #$00 ; Clear high byte ldx #$00 ; Clear high byte
rts rts
; ------------------------------------------------------------------------- ; -------------------------------------------------------------------------
; Helper functions ; Helper functions

View File

@ -29,7 +29,7 @@ ctrl: .addr _read
.res 2 ; MODULE .res 2 ; MODULE
.res 2 ; MODULE_SIZE .res 2 ; MODULE_SIZE
.res 2 ; MODULE_ID .res 2 ; MODULE_ID
;---------------------------------------------------------------------------- ;----------------------------------------------------------------------------
; Code ; Code

View File

@ -97,7 +97,7 @@ putchar:
ldy #$F8 ldy #$F8
lda CHARCOLOR lda CHARCOLOR
lsr lsr
bcc @delete1 bcc @delete1
@copylp1: @copylp1:
@ -106,7 +106,7 @@ putchar:
sta LCD_DATA sta LCD_DATA
iny iny
bne @copylp1 bne @copylp1
beq @skip_delete1 beq @skip_delete1
@delete1: @delete1:
@ -126,9 +126,9 @@ putchar:
ldx CURS_Y ldx CURS_Y
lda _plotlo,x lda _plotlo,x
sta LCD_Y sta LCD_Y
ldy #$F8 ldy #$F8
lda CHARCOLOR lda CHARCOLOR
and #2 and #2
beq @delete2 beq @delete2
@ -139,9 +139,9 @@ putchar:
sta LCD_DATA sta LCD_DATA
iny iny
bne @copylp2 bne @copylp2
beq @skip_delete2 beq @skip_delete2
@delete2: @delete2:
lda #$00 lda #$00
@del2: @del2:

View File

@ -9,5 +9,5 @@
.import return0 .import return0
_ExitTurbo = return0 _ExitTurbo = return0

View File

@ -9,7 +9,7 @@
.import setoserror .import setoserror
.include "jumptab.inc" .include "jumptab.inc"
_ChangeDiskDevice: _ChangeDiskDevice:
jsr ChangeDiskDevice jsr ChangeDiskDevice
jmp setoserror jmp setoserror

View File

@ -10,7 +10,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_ChkDkGEOS: _ChkDkGEOS:
jsr ChkDkGEOS jsr ChkDkGEOS
jsr setoserror jsr setoserror

View File

@ -20,21 +20,21 @@
_dio_phys_to_log: _dio_phys_to_log:
sta ptr1 sta ptr1
stx ptr1+1 ; pointer to result stx ptr1+1 ; pointer to result
jsr popax jsr popax
sta ptr2 sta ptr2
stx ptr2+1 ; pointer to input structure stx ptr2+1 ; pointer to input structure
jsr popax jsr popax
sta ptr3 sta ptr3
stx ptr3+1 ; pointer to handle stx ptr3+1 ; pointer to handle
ldy #sst_flag ldy #sst_flag
lda (ptr3),y lda (ptr3),y
and #128 and #128
beq _inv_hand ; handle not open or invalid beq _inv_hand ; handle not open or invalid
ldy #diopp_head ldy #diopp_head
lda (ptr2),y lda (ptr2),y
bne _inv_data ; there is only head 0 bne _inv_data ; there is only head 0
@ -66,7 +66,7 @@ _dio_phys_to_log:
beq dio_cts1571 beq dio_cts1571
cmp #DRV_1581 cmp #DRV_1581
beq dio_cts1581 beq dio_cts1581
lda #INCOMPATIBLE ; unsupported device lda #INCOMPATIBLE ; unsupported device
ldx #0 ldx #0
beq ret beq ret
@ -78,10 +78,10 @@ dio_ctsend:
dey dey
lda tmp1 lda tmp1
sta (ptr1),y sta (ptr1),y
ldx #0 ldx #0
txa txa
ret: ret:
sta __oserror sta __oserror
rts ; return success rts ; return success

View File

@ -45,7 +45,7 @@ _dio_open:
asl a ; make index from drive id asl a ; make index from drive id
asl a asl a
tax tax
lda #0 lda #0
sta sectsizetab+sst_sectsize,x sta sectsizetab+sst_sectsize,x
lda #128 lda #128
@ -54,7 +54,7 @@ _dio_open:
sta sectsizetab+sst_sectsize+1,x sta sectsizetab+sst_sectsize+1,x
tya tya
sta sectsizetab+sst_driveno,x sta sectsizetab+sst_driveno,x
stx tmp1 stx tmp1
lda #<sectsizetab lda #<sectsizetab
clc clc

View File

@ -20,15 +20,15 @@ _dio_log_to_phys:
; check device type ; check device type
sta ptr1 sta ptr1
stx ptr1+1 ; pointer to result (struct dio_phys_pos) stx ptr1+1 ; pointer to result (struct dio_phys_pos)
jsr popax jsr popax
sta ptr2 sta ptr2
stx ptr2+1 ; pointer to input structure (pointer to int) stx ptr2+1 ; pointer to input structure (pointer to int)
jsr popax jsr popax
sta ptr3 sta ptr3
stx ptr3+1 ; pointer to handle stx ptr3+1 ; pointer to handle
ldy #sst_flag ldy #sst_flag
lda (ptr3),y lda (ptr3),y
and #128 and #128
@ -42,18 +42,18 @@ _dio_log_to_phys:
sta (ptr1),y ; track <256 sta (ptr1),y ; track <256
ldy #diopp_sector+1 ldy #diopp_sector+1
sta (ptr1),y ; sector <256 sta (ptr1),y ; sector <256
ldy #0 ldy #0
lda (ptr2),y lda (ptr2),y
sta tmp1 sta tmp1
iny iny
lda (ptr2),y lda (ptr2),y
sta tmp2 sta tmp2
; get drive info ; get drive info
ldy #sst_driveno ldy #sst_driveno
lda (ptr3),y lda (ptr3),y
tay tay
lda driveType,y lda driveType,y
and #%00001111 ; remove ramDisk flags and #%00001111 ; remove ramDisk flags
cmp #DRV_1541 cmp #DRV_1541
@ -62,7 +62,7 @@ _dio_log_to_phys:
beq dio_stc1571 beq dio_stc1571
cmp #DRV_1581 cmp #DRV_1581
beq dio_stc1581 beq dio_stc1581
lda #INCOMPATIBLE ; unsupported device lda #INCOMPATIBLE ; unsupported device
ldx #0 ldx #0
beq _ret beq _ret
@ -74,10 +74,10 @@ dio_stcend:
ldy #diopp_sector ldy #diopp_sector
lda tmp2 lda tmp2
sta (ptr1),y sta (ptr1),y
ldx #0 ldx #0
txa txa
_ret: _ret:
sta __oserror sta __oserror
rts ; return success rts ; return success
@ -107,14 +107,14 @@ _nxt: bcc _found
cpx #35 cpx #35
bne _loop41 bne _loop41
beq _inv_data beq _inv_data
_found: _found:
lda tmp1 lda tmp1
sec sec
sbc sectab_1541_l,x sbc sectab_1541_l,x
sta tmp2 sta tmp2
_fndend: _fndend:
inx inx
stx tmp1 stx tmp1
jmp dio_stcend jmp dio_stcend
@ -128,9 +128,9 @@ dio_stc1571:
lda tmp1 lda tmp1
cmp #<683 cmp #<683
_if71: bcc dio_stc1541 _if71: bcc dio_stc1541
lda tmp1 lda tmp1
sec sec
sbc #<683 sbc #<683
sta tmp1 sta tmp1
lda tmp2 lda tmp2
@ -139,10 +139,10 @@ _if71: bcc dio_stc1541
jsr dio_stc1541 ; will fall through here jsr dio_stc1541 ; will fall through here
tay tay
bne _ret ; result beyond track 70 bne _ret ; result beyond track 70
ldy #diopp_track ldy #diopp_track
lda (ptr1),y lda (ptr1),y
clc clc
adc #35 adc #35
sta (ptr1),y sta (ptr1),y
lda #0 lda #0
@ -153,26 +153,26 @@ _if71: bcc dio_stc1541
; - the remainder is sector ; - the remainder is sector
dio_stc1581: dio_stc1581:
ldx #0 ; index=(track-1) ldx #0 ; index=(track-1)
_loop81: _loop81:
lda tmp2 lda tmp2
bne _sub81 bne _sub81
lda tmp1 lda tmp1
cmp #40 cmp #40
bcc _got81 bcc _got81
_sub81: lda tmp1 _sub81: lda tmp1
sec sec
sbc #40 sbc #40
sta tmp1 sta tmp1
lda tmp2 lda tmp2
sbc #0 sbc #0
sta tmp2 sta tmp2
inx inx
cpx #80 cpx #80
bne _loop81 bne _loop81
beq _inv_data beq _inv_data
_got81: lda tmp1 _got81: lda tmp1
sta tmp2 sta tmp2
inx inx
stx tmp1 stx tmp1
jmp dio_stcend jmp dio_stcend

View File

@ -8,5 +8,5 @@
.export _EnterTurbo .export _EnterTurbo
.include "jumptab.inc" .include "jumptab.inc"
_EnterTurbo = EnterTurbo _EnterTurbo = EnterTurbo

View File

@ -8,5 +8,5 @@
.export _ExitTurbo .export _ExitTurbo
.include "jumptab.inc" .include "jumptab.inc"
_ExitTurbo = ExitTurbo _ExitTurbo = ExitTurbo

View File

@ -12,7 +12,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_FindBAMBit: _FindBAMBit:
jsr gettrse jsr gettrse
sta r6L sta r6L

View File

@ -9,7 +9,7 @@
.import setoserror .import setoserror
.include "jumptab.inc" .include "jumptab.inc"
_NewDisk: _NewDisk:
jsr NewDisk jsr NewDisk
jmp setoserror jmp setoserror

View File

@ -8,5 +8,5 @@
.export _PurgeTurbo .export _PurgeTurbo
.include "jumptab.inc" .include "jumptab.inc"
_PurgeTurbo = PurgeTurbo _PurgeTurbo = PurgeTurbo

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_ReadBlock: _ReadBlock:
sta r4L sta r4L
stx r4H stx r4H

View File

@ -11,7 +11,7 @@
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_ReadBuff: _ReadBuff:
jsr gettrse jsr gettrse
sta r1L sta r1L

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_VerWriteBlock: _VerWriteBlock:
sta r4L sta r4L
stx r4H stx r4H

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_WriteBlock: _WriteBlock:
sta r4L sta r4L
stx r4H stx r4H

View File

@ -11,7 +11,7 @@
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_WriteBuff: _WriteBuff:
jsr gettrse jsr gettrse
sta r1L sta r1L

View File

@ -82,54 +82,54 @@ INSTALL:
pha pha
lda #$35 lda #$35
sta $01 sta $01
ldx #VDC_CSET ; determine size of RAM... ldx #VDC_CSET ; determine size of RAM...
jsr vdcgetreg jsr vdcgetreg
sta tmp1 sta tmp1
ora #%00010000 ora #%00010000
jsr vdcputreg ; turn on 64k jsr vdcputreg ; turn on 64k
jsr settestadr1 ; save original value of test byte jsr settestadr1 ; save original value of test byte
jsr vdcgetbyte jsr vdcgetbyte
sta tmp2 sta tmp2
lda #$55 ; write $55 here lda #$55 ; write $55 here
ldy #ptr1 ldy #ptr1
jsr test64k ; read it here and there jsr test64k ; read it here and there
lda #$aa ; write $aa here lda #$aa ; write $aa here
ldy #ptr2 ldy #ptr2
jsr test64k ; read it here and there jsr test64k ; read it here and there
jsr settestadr1 jsr settestadr1
lda tmp2 lda tmp2
jsr vdcputbyte ; restore original value of test byte jsr vdcputbyte ; restore original value of test byte
lda ptr1 ; do bytes match? lda ptr1 ; do bytes match?
cmp ptr1+1 cmp ptr1+1
bne @have64k bne @have64k
lda ptr2 lda ptr2
cmp ptr2+1 cmp ptr2+1
bne @have64k bne @have64k
ldx #VDC_CSET ldx #VDC_CSET
lda tmp1 lda tmp1
jsr vdcputreg ; restore 16/64k flag jsr vdcputreg ; restore 16/64k flag
jmp @endok ; and leave default values for 16k jmp @endok ; and leave default values for 16k
@have64k: @have64k:
lda #<256 lda #<256
ldx #>256 ldx #>256
sta pagecount sta pagecount
stx pagecount+1 stx pagecount+1
@endok: @endok:
pla pla
sta $01 sta $01
plp plp
lda #<EM_ERR_OK lda #<EM_ERR_OK
ldx #>EM_ERR_OK ldx #>EM_ERR_OK
rts rts
test64k: test64k:
sta tmp1 sta tmp1
sty ptr3 sty ptr3
lda #0 lda #0
@ -186,14 +186,14 @@ MAP: sta curpage
sta ptr1+1 sta ptr1+1
ldy #0 ldy #0
sty ptr1 sty ptr1
lda #<window lda #<window
sta ptr2 sta ptr2
lda #>window lda #>window
sta ptr2+1 sta ptr2+1
jsr transferin jsr transferin
lda #<window lda #<window
ldx #>window ldx #>window
rts rts
@ -299,7 +299,7 @@ COPYFROM:
bne @L1 bne @L1
; Copy the remainder of the page ; Copy the remainder of the page
@L2: ldy #EM_COPY::COUNT @L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page lda (ptr3),y ; Get bytes in last page
beq @L4 beq @L4
@ -391,9 +391,9 @@ vdcgetreg:
@L0: bit VDC_ADDR_REG @L0: bit VDC_ADDR_REG
bpl @L0 bpl @L0
lda VDC_DATA_REG lda VDC_DATA_REG
rts rts
vdcputbyte: vdcputbyte:
ldx #VDC_DATA ldx #VDC_DATA
vdcputreg: vdcputreg:
stx VDC_ADDR_REG stx VDC_ADDR_REG

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_FollowChain: _FollowChain:
sta r3L sta r3L
stx r3H stx r3H

View File

@ -9,7 +9,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
_SetNewMode: _SetNewMode:
lda graphMode lda graphMode
eor #$80 eor #$80

View File

@ -8,5 +8,5 @@
.export _SetDevice .export _SetDevice
.include "jumptab.inc" .include "jumptab.inc"
_SetDevice = SetDevice _SetDevice = SetDevice

View File

@ -93,7 +93,7 @@ Y2 = ptr4
SCRBASE: SCRBASE:
.res 1 ; High byte of screen base (64k VDC only) .res 1 ; High byte of screen base (64k VDC only)
ERROR: ERROR:
.res 1 ; Error code .res 1 ; Error code
PALETTE: PALETTE:
.res 2 ; The current palette .res 2 ; The current palette
@ -199,9 +199,9 @@ INSTALL:
@endok: @endok:
lda #0 lda #0
sta SCRBASE ; draw page 0 as default sta SCRBASE ; draw page 0 as default
rts rts
test64k: test64k:
sta tmp1 sta tmp1
sty ptr3 sty ptr3
lda #0 lda #0

View File

@ -7,7 +7,7 @@
.export zerobss .export zerobss
.import __BSS_RUN__, __BSS_SIZE__ .import __BSS_RUN__, __BSS_SIZE__
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"

View File

@ -11,7 +11,7 @@
.importzp cursor_r, cursor_c .importzp cursor_r, cursor_c
.import _cursor .import _cursor
.constructor initscrsize .constructor initscrsize
.include "geossym.inc" .include "geossym.inc"
.segment "ONCE" .segment "ONCE"
@ -38,7 +38,7 @@ L1: lda #40 ; 40 columns (more or less)
.code .code
screensize: screensize:
ldx xsize ldx xsize
ldy ysize ldy ysize
rts rts

View File

@ -19,7 +19,7 @@
; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8 ; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8
; ;
; note that there are conflicts between control characters and keyboard: ; note that there are conflicts between control characters and keyboard:
; HOME = KEY_ENTER, KEY_HOME = REV_ON, ; HOME = KEY_ENTER, KEY_HOME = REV_ON,
; UPLINE = ?, KEY_UPARROW = GOTOY, ... ; UPLINE = ?, KEY_UPARROW = GOTOY, ...
.export _cputcxy, _cputc .export _cputcxy, _cputc

View File

@ -18,7 +18,7 @@ _cvlinexy:
jsr gotoxy ; Call this one, will pop params jsr gotoxy ; Call this one, will pop params
pla ; Restore the length pla ; Restore the length
_cvline: _cvline:
cmp #0 ; Is the length zero? cmp #0 ; Is the length zero?
beq L9 ; Jump if done beq L9 ; Jump if done
tax tax

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_BlkAlloc: _BlkAlloc:
sta r2L sta r2L
stx r2H stx r2H

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_CalcBlksFree: _CalcBlksFree:
lda #<curDirHead lda #<curDirHead
ldx #>curDirHead ldx #>curDirHead

View File

@ -11,7 +11,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_FreeBlock: _FreeBlock:
jsr gettrse jsr gettrse
sta r6L sta r6L

View File

@ -12,7 +12,7 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "diskdrv.inc" .include "diskdrv.inc"
.include "geossym.inc" .include "geossym.inc"
_GetBlock: _GetBlock:
sta r4L sta r4L
stx r4H stx r4H

Some files were not shown because too many files have changed in this diff Show More