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
oserr: jsr popname ; Preserves A
; Set __oserror
jmp __mappederrno

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
.ifdef __ATARIXL__
_doesclrscrafterexit = return1 ; the c65 runtime always clears the screen at program termination
.else
.else
_doesclrscrafterexit:
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -44,7 +44,7 @@
;
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
lda #JOY_ERR_OK
ldx #0

View File

@ -10,7 +10,7 @@
.include "atari5200.inc"
__randomize:
__randomize:
ldx VCOUNT ; Use vertical line counter as high byte
lda RTCLOK+1 ; Use clock as low byte
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?
BNE Y2K0 ; Jump if not
LDA #$42 ; Yes, 4 port system
Y2K0 STA TEMPL
Y2K1 LDA (TEMPL),Y
Y2K0 STA TEMPL
Y2K1 LDA (TEMPL),Y
STA $0600,Y
INY
INY
BNE Y2K1
LDY #$50
INC TEMPH
Y2K2 LDA (TEMPL),Y
Y2K2 LDA (TEMPL),Y
STA $0700,Y
DEY
DEY
BPL Y2K2
LDA #$D4 ; Point to copyright string
STA $0724
@ -26,8 +26,8 @@ Y2K2 LDA (TEMPL),Y
STA $0725
LDX #$0B ; Store NOP's @ end
LDA #$EA
Y2K3 STA $0732,X
DEX
Y2K3 STA $0732,X
DEX
BPL Y2K3
LDA #$60 ; Store RTS opcode @ end
STA $0750

View File

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

View File

@ -85,7 +85,7 @@ COUNT:
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:
; Y has joystick of interest 0/1

View File

@ -6,7 +6,7 @@
;
.export _cclearxy, _cclear
.import setscrptr
.import setscrptr
.import rvs
.import popax
.importzp ptr2
@ -25,7 +25,7 @@ _cclear:
tax ; Is the length zero?
beq @L9 ; Jump if done
jsr setscrptr ; Set ptr2 to screen, won't use X
lda #' '
lda #' '
ora rvs
@L1: sta (ptr2),y ; Write one 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 ; 188/bc ___________, 189/bd ___________
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 ; 194/c2 ___________, 195/c3 ___________
ct_mix CT_UPPER_IDX, CT_UPPER_IDX ; 196/c4 ___________, 197/c5 ___________

View File

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

View File

@ -12,9 +12,9 @@
/* 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,
const void* data,
const void* data,
unsigned int size)
{
cbm_k_setlfs(0, device, 0);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
/*
** 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,
** 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.
*/

View File

@ -2,7 +2,7 @@
; Ullrich von Bassewitz, 2004-05-13
;
; __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.
;

View File

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

View File

@ -9,7 +9,7 @@
;
; 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.
; Return value is in accu and x has to be always clear when returning
; (makes calling code shorter)!

View File

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

View File

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

View File

@ -161,7 +161,7 @@
bne @L8
; 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
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
; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the
; block.

View File

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

View File

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

View File

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

View File

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

View File

@ -67,7 +67,7 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0!
jsr popptr1 ; save src to ptr1
; 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
; (total cycle count with return))
lda (sp),y

View File

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

View File

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

View File

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

View File

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

View File

@ -28,9 +28,9 @@ _raise:
sta jmpvec+1
lda sigtable+1,x
sta jmpvec+2
; 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).
lda #<__sig_dfl
@ -51,4 +51,4 @@ _raise:
invalidsig:
rts

View File

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

View File

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

View File

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

View File

@ -16,8 +16,8 @@ _strrchr:
stx ptr1+1
ldx #0 ; default function result is NULL, X is high 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:
lda (ptr1),y ; get char
beq finished ; jump if end of string

View File

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

View File

@ -30,7 +30,7 @@ _vsprintf:
ldy #2
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
jmp vsnprintf

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
boxchars:
; Vertical Line
.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
; Top Right
.byte $00
@ -39,7 +39,7 @@ boxchars:
.byte $18
.byte $18
.byte $18
.byte $18
.byte $18
; Bottom Left
.byte $18
@ -49,7 +49,7 @@ boxchars:
.byte $00
.byte $00
.byte $00
.byte $00
.byte $00
; Bottom Right
.byte $18
@ -59,4 +59,4 @@ boxchars:
.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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@
; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8
;
; 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, ...
.export _cputcxy, _cputc

View File

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

View File

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

View File

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

View File

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

View File

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

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