diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index 2ccc7eeb9..23c1f580c 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -75,11 +75,11 @@ start: lda MEMTOP sbc #<__RESERVED_MEMORY__ sta APPMHI ; initialize our APPMHI value - sta c_sp ; set up runtime stack part 1 + sta c_sp ; set up runtime stack part 1 lda MEMTOP+1 sbc #>__RESERVED_MEMORY__ sta APPMHI+1 - sta c_sp+1 ; set up runtime stack part 2 + sta c_sp+1 ; set up runtime stack part 2 .endif diff --git a/libsrc/atari/fdtable.s b/libsrc/atari/fdtable.s index 9323af5d3..d1d869387 100644 --- a/libsrc/atari/fdtable.s +++ b/libsrc/atari/fdtable.s @@ -229,7 +229,7 @@ freefnd:txa beq l2 l1: ldy #0 - lda (c_sp),y ; get device + lda (c_sp),y ; get device l2: sta fd_table+ft_dev,x ; set device lda #1 sta fd_table+ft_usa,x ; set usage counter diff --git a/libsrc/atari/ucase_fn.s b/libsrc/atari/ucase_fn.s index d67fa36e5..534c6a21c 100644 --- a/libsrc/atari/ucase_fn.s +++ b/libsrc/atari/ucase_fn.s @@ -69,7 +69,7 @@ loop2: lda (ptr4),y cmp #'a' bcc L1 ; Not lowercase and #$DF ; make upper case char, assume ASCII chars - sta (c_sp),y ; store back + sta (c_sp),y ; store back L1: iny bpl loop2 ; bpl: this way we only support a max. length of 127 @@ -93,7 +93,7 @@ copy_end: jsr subysp ; adjust stack pointer dey cpdev: lda __defdev,y - sta (c_sp),y ; insert device name, number and ':' + sta (c_sp),y ; insert device name, number and ':' dey bpl cpdev hasdev2: diff --git a/libsrc/atari5200/crt0.s b/libsrc/atari5200/crt0.s index b0b0738a0..a72d7f9f6 100644 --- a/libsrc/atari5200/crt0.s +++ b/libsrc/atari5200/crt0.s @@ -28,7 +28,7 @@ start: lda #<(__RAM_START__ + __RAM_SIZE__ - __RESERVED_MEMORY__) ldx #>(__RAM_START__ + __RAM_SIZE__ - __RESERVED_MEMORY__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/atmos/crt0.s b/libsrc/atmos/crt0.s index 05137193c..55c60dd30 100644 --- a/libsrc/atmos/crt0.s +++ b/libsrc/atmos/crt0.s @@ -86,7 +86,7 @@ L1: lda c_sp,x lda #<(__MAIN_START__ + __MAIN_SIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/c128/crt0.s b/libsrc/c128/crt0.s index b54533864..f6a55778c 100644 --- a/libsrc/c128/crt0.s +++ b/libsrc/c128/crt0.s @@ -59,7 +59,7 @@ L1: lda c_sp,x lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/c16/crt0.s b/libsrc/c16/crt0.s index 491000e52..c203fb20f 100644 --- a/libsrc/c16/crt0.s +++ b/libsrc/c16/crt0.s @@ -50,7 +50,7 @@ L1: lda c_sp,x ldy #$80 ldx #$00 MemOk: stx c_sp - sty c_sp+1 ; set argument stack ptr + sty c_sp+1 ; set argument stack ptr ; Call the module constructors. diff --git a/libsrc/c64/crt0.s b/libsrc/c64/crt0.s index 9e0162513..dea9226aa 100644 --- a/libsrc/c64/crt0.s +++ b/libsrc/c64/crt0.s @@ -95,7 +95,7 @@ L1: lda c_sp,x lda #<(__MAIN_START__ + __MAIN_SIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Switch to the second charset. diff --git a/libsrc/common/fread.s b/libsrc/common/fread.s index 2dc9ad936..be06c2a62 100644 --- a/libsrc/common/fread.s +++ b/libsrc/common/fread.s @@ -152,7 +152,7 @@ lda (c_sp),y sta ptr1+1 adc #0 - sta (c_sp),y ; ptr1 = buf++; + sta (c_sp),y ; ptr1 = buf++; ; Get the buffered character and place it as first character into the read ; buffer. diff --git a/libsrc/common/memcpy.s b/libsrc/common/memcpy.s index e9c3f1968..8f6531956 100644 --- a/libsrc/common/memcpy.s +++ b/libsrc/common/memcpy.s @@ -74,6 +74,6 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0! tax stx ptr2+1 ; save high byte of ptr2 dey ; Y = 0 - lda (c_sp),y ; Get ptr2 low + lda (c_sp),y ; Get ptr2 low sta ptr2 rts diff --git a/libsrc/common/memset.s b/libsrc/common/memset.s index 13e8ece9f..5d56507a5 100644 --- a/libsrc/common/memset.s +++ b/libsrc/common/memset.s @@ -39,7 +39,7 @@ common: ; Fill value is in X! lda (c_sp),y sta ptr1+1 ; save high byte of ptr dey ; Y = 0 - lda (c_sp),y ; Get ptr + lda (c_sp),y ; Get ptr sta ptr1 lsr ptr3+1 ; divide number of diff --git a/libsrc/common/vfprintf.s b/libsrc/common/vfprintf.s index 65bf62a22..3dc1e6729 100644 --- a/libsrc/common/vfprintf.s +++ b/libsrc/common/vfprintf.s @@ -121,12 +121,12 @@ _vfprintf: ; exactly as _printf expects it. Parameters will get dropped by _printf. ldy #2 - lda (c_sp),y ; Low byte of f + lda (c_sp),y ; Low byte of f sta ptr lda #outdesc sta (c_sp),y diff --git a/libsrc/common/vscanf.s b/libsrc/common/vscanf.s index 1681acd97..a97bd163a 100644 --- a/libsrc/common/vscanf.s +++ b/libsrc/common/vscanf.s @@ -31,7 +31,7 @@ _vscanf: ; Move the format down ldy #2 - lda (c_sp),y ; Load byte of format + lda (c_sp),y ; Load byte of format ldy #0 sta (c_sp),y ldy #3 diff --git a/libsrc/cx16/crt0.s b/libsrc/cx16/crt0.s index 0f8452a32..5ee81b184 100644 --- a/libsrc/cx16/crt0.s +++ b/libsrc/cx16/crt0.s @@ -81,7 +81,7 @@ init: lda #<(__MAIN_START__ + __MAIN_SIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Switch to the lower/UPPER PetSCII charset. diff --git a/libsrc/dbg/dbgdump.s b/libsrc/dbg/dbgdump.s index 2a4aea3f7..335175840 100644 --- a/libsrc/dbg/dbgdump.s +++ b/libsrc/dbg/dbgdump.s @@ -11,16 +11,16 @@ _DbgMemDump: ldy #0 - lda (c_sp),y ; Get length + lda (c_sp),y ; Get length sta tmp4 iny - lda (c_sp),y ; Get the string buffer + lda (c_sp),y ; Get the string buffer sta ptr3 iny lda (c_sp),y sta ptr3+1 iny - lda (c_sp),y ; Get the address + lda (c_sp),y ; Get the address sta ptr4 iny lda (c_sp),y diff --git a/libsrc/nes/crt0.s b/libsrc/nes/crt0.s index 9b5ceb337..dfc26dcde 100644 --- a/libsrc/nes/crt0.s +++ b/libsrc/nes/crt0.s @@ -108,7 +108,7 @@ start: lda #<(__SRAM_START__ + __SRAM_SIZE__) ldx #>(__SRAM_START__ + __SRAM_SIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/pce/memcpy.s b/libsrc/pce/memcpy.s index 5a0822ec1..7ee33477b 100644 --- a/libsrc/pce/memcpy.s +++ b/libsrc/pce/memcpy.s @@ -86,9 +86,9 @@ memcpy_getparams: ; (Direct stack access is six cycles faster [total cycle count].) iny ; (Y=0 by popptr1, need '1' here) save dest - lda (c_sp),y ; get high byte + lda (c_sp),y ; get high byte tax - lda (c_sp) ; get low byte + lda (c_sp) ; get low byte sta ptr2 stx ptr2+1 rts ; return dest address (for memmove) diff --git a/libsrc/pet/crt0.s b/libsrc/pet/crt0.s index ff57d7bac..e3c6ed4b4 100644 --- a/libsrc/pet/crt0.s +++ b/libsrc/pet/crt0.s @@ -54,7 +54,7 @@ L1: lda c_sp,x lda MEMSIZE sta c_sp lda MEMSIZE+1 - sta c_sp+1 ; Set argument stack ptr + sta c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/runtime/add.s b/libsrc/runtime/add.s index b308614a1..85ddd0f25 100644 --- a/libsrc/runtime/add.s +++ b/libsrc/runtime/add.s @@ -20,34 +20,34 @@ tosaddax: .if (.cpu .bitand ::CPU_ISET_65SC02) - adc (c_sp) ; (7) + adc (c_sp) ; (7) tay ; (9) - inc c_sp ; (14) + inc c_sp ; (14) bne hiadd ; (17) - inc c_sp+1 ; (-1+5) + inc c_sp+1 ; (-1+5) hiadd: txa ; (19) - adc (c_sp) ; (24) + adc (c_sp) ; (24) tax ; (26) - inc c_sp ; (31) + inc c_sp ; (31) bne done ; (34) - inc c_sp+1 ; (-1+5) + inc c_sp+1 ; (-1+5) done: tya ; (36) .else ldy #0 ; (4) - adc (c_sp),y ; (9) lo byte + adc (c_sp),y ; (9) lo byte iny ; (11) sta tmp1 ; (14) save it txa ; (16) - adc (c_sp),y ; (21) hi byte + adc (c_sp),y ; (21) hi byte tax ; (23) clc ; (25) - lda c_sp ; (28) + lda c_sp ; (28) adc #2 ; (30) - sta c_sp ; (33) + sta c_sp ; (33) bcc L1 ; (36) - inc c_sp+1 ; (-1+5) + inc c_sp+1 ; (-1+5) L1: lda tmp1 ; (39) restore low byte .endif diff --git a/libsrc/runtime/addysp.s b/libsrc/runtime/addysp.s index 553ed98c7..d48e048bb 100644 --- a/libsrc/runtime/addysp.s +++ b/libsrc/runtime/addysp.s @@ -12,10 +12,10 @@ addysp1: addysp: pha ; Save A clc tya ; Get the value - adc c_sp ; Add low byte - sta c_sp ; Put it back + adc c_sp ; Add low byte + sta c_sp ; Put it back bcc @L1 ; If no carry, we're done - inc c_sp+1 ; Inc high byte + inc c_sp+1 ; Inc high byte @L1: pla ; Restore A rts diff --git a/libsrc/runtime/and.s b/libsrc/runtime/and.s index 21acebb66..8411660ab 100644 --- a/libsrc/runtime/and.s +++ b/libsrc/runtime/and.s @@ -14,7 +14,7 @@ tosanda0: ldx #$00 tosandax: .if (.cpu .bitand CPU_ISET_65SC02) - and (c_sp) ; 65SC02 version, saves 2 cycles and 1 byte + and (c_sp) ; 65SC02 version, saves 2 cycles and 1 byte ldy #1 .else ldy #0 diff --git a/libsrc/runtime/enter.s b/libsrc/runtime/enter.s index 5915f579a..454c2a6f9 100644 --- a/libsrc/runtime/enter.s +++ b/libsrc/runtime/enter.s @@ -13,6 +13,6 @@ enter: tya ; get arg size dec c_sp+1 L1: dec c_sp ldy #0 - sta (c_sp),y ; Store the arg count + sta (c_sp),y ; Store the arg count rts diff --git a/libsrc/runtime/icmp.s b/libsrc/runtime/icmp.s index 0d3bb6140..eba8ce561 100644 --- a/libsrc/runtime/icmp.s +++ b/libsrc/runtime/icmp.s @@ -17,16 +17,16 @@ tosicmp: stx sreg+1 ; Save ax ldy #$00 - lda (c_sp),y ; Get low byte + lda (c_sp),y ; Get low byte tax - inc c_sp ; 5 + inc c_sp ; 5 bne @L1 ; 3 - inc c_sp+1 ; (5) + inc c_sp+1 ; (5) @L1: - lda (c_sp),y ; Get high byte - inc c_sp ; 5 + lda (c_sp),y ; Get high byte + inc c_sp ; 5 bne @L2 ; 3 - inc c_sp+1 ; (5) + inc c_sp+1 ; (5) ; Do the compare. diff --git a/libsrc/runtime/incsp2.s b/libsrc/runtime/incsp2.s index 0d84dc7bb..c3260c19d 100644 --- a/libsrc/runtime/incsp2.s +++ b/libsrc/runtime/incsp2.s @@ -14,13 +14,13 @@ .proc popax ldy #1 - lda (c_sp),y ; get hi byte + lda (c_sp),y ; get hi byte tax ; into x .if (.cpu .bitand ::CPU_ISET_65SC02) - lda (c_sp) ; get lo byte + lda (c_sp) ; get lo byte .else dey - lda (c_sp),y ; get lo byte + lda (c_sp),y ; get lo byte .endif .endproc @@ -29,14 +29,14 @@ .proc incsp2 - inc c_sp ; 5 + inc c_sp ; 5 beq @L1 ; 2 - inc c_sp ; 5 + inc c_sp ; 5 beq @L2 ; 2 rts -@L1: inc c_sp ; 5 -@L2: inc c_sp+1 ; 5 +@L1: inc c_sp ; 5 +@L2: inc c_sp+1 ; 5 rts .endproc diff --git a/libsrc/runtime/ladd.s b/libsrc/runtime/ladd.s index 6658d7ec6..6c187f32d 100644 --- a/libsrc/runtime/ladd.s +++ b/libsrc/runtime/ladd.s @@ -20,24 +20,24 @@ tosadd0ax: tosaddeax: clc .if (.cpu .bitand CPU_ISET_65SC02) - adc (c_sp) ; 65SC02 version - saves 2 cycles + adc (c_sp) ; 65SC02 version - saves 2 cycles ldy #1 .else ldy #0 - adc (c_sp),y ; lo byte + adc (c_sp),y ; lo byte iny .endif sta tmp1 ; use as temp storage txa - adc (c_sp),y ; byte 1 + adc (c_sp),y ; byte 1 tax iny lda sreg - adc (c_sp),y ; byte 2 + adc (c_sp),y ; byte 2 sta sreg iny lda sreg+1 - adc (c_sp),y ; byte 3 + adc (c_sp),y ; byte 3 sta sreg+1 lda tmp1 ; load byte 0 jmp addysp1 ; drop TOS diff --git a/libsrc/runtime/land.s b/libsrc/runtime/land.s index 9dd3cad6a..400fede3b 100644 --- a/libsrc/runtime/land.s +++ b/libsrc/runtime/land.s @@ -23,24 +23,24 @@ tosand0ax: tosandeax: .if (.cpu .bitand ::CPU_ISET_65SC02) - and (c_sp) ; byte 0 + and (c_sp) ; byte 0 ldy #1 .else ldy #0 - and (c_sp),y ; byte 0 + and (c_sp),y ; byte 0 iny .endif sta tmp1 txa - and (c_sp),y ; byte 1 + and (c_sp),y ; byte 1 tax iny lda sreg - and (c_sp),y ; byte 2 + and (c_sp),y ; byte 2 sta sreg iny lda sreg+1 - and (c_sp),y ; byte 3 + and (c_sp),y ; byte 3 sta sreg+1 lda tmp1 diff --git a/libsrc/runtime/ldaxsp.s b/libsrc/runtime/ldaxsp.s index 88a3043a0..b744ce242 100644 --- a/libsrc/runtime/ldaxsp.s +++ b/libsrc/runtime/ldaxsp.s @@ -12,9 +12,9 @@ ldax0sp: ldy #1 ldaxysp: - lda (c_sp),y ; get high byte + lda (c_sp),y ; get high byte tax ; and save it dey ; point to lo byte - lda (c_sp),y ; load low byte + lda (c_sp),y ; load low byte rts diff --git a/libsrc/runtime/leave.s b/libsrc/runtime/leave.s index a917ab955..408fdd159 100644 --- a/libsrc/runtime/leave.s +++ b/libsrc/runtime/leave.s @@ -31,7 +31,7 @@ leavey: .if (.cpu .bitand ::CPU_ISET_65SC02) leave: tay ; save A a sec - lda (c_sp) ; that's the pushed arg size + lda (c_sp) ; that's the pushed arg size sec ; Count the byte, the count's stored in adc c_sp sta c_sp @@ -43,7 +43,7 @@ L1: tya ; Get return value back leave: pha ; save A a sec ldy #0 - lda (c_sp),y ; that's the pushed arg size + lda (c_sp),y ; that's the pushed arg size sec ; Count the byte, the count's stored in adc c_sp sta c_sp diff --git a/libsrc/runtime/lor.s b/libsrc/runtime/lor.s index 94731adac..888a0c611 100644 --- a/libsrc/runtime/lor.s +++ b/libsrc/runtime/lor.s @@ -27,20 +27,20 @@ tosoreax: ldy #1 .else ldy #0 - ora (c_sp),y ; byte 0 + ora (c_sp),y ; byte 0 iny .endif sta tmp1 txa - ora (c_sp),y ; byte 1 + ora (c_sp),y ; byte 1 tax iny lda sreg - ora (c_sp),y ; byte 2 + ora (c_sp),y ; byte 2 sta sreg iny lda sreg+1 - ora (c_sp),y ; byte 3 + ora (c_sp),y ; byte 3 sta sreg+1 lda tmp1 diff --git a/libsrc/runtime/lrsub.s b/libsrc/runtime/lrsub.s index 3bf941951..456d8d8d5 100644 --- a/libsrc/runtime/lrsub.s +++ b/libsrc/runtime/lrsub.s @@ -31,20 +31,20 @@ tosrsubeax: ldy #1 .else ldy #0 - sbc (c_sp),y ; byte 0 + sbc (c_sp),y ; byte 0 iny .endif sta tmp1 ; use as temp storage txa - sbc (c_sp),y ; byte 1 + sbc (c_sp),y ; byte 1 tax iny lda sreg - sbc (c_sp),y ; byte 2 + sbc (c_sp),y ; byte 2 sta sreg iny lda sreg+1 - sbc (c_sp),y ; byte 3 + sbc (c_sp),y ; byte 3 sta sreg+1 lda tmp1 jmp addysp1 ; drop TOS diff --git a/libsrc/runtime/lsub.s b/libsrc/runtime/lsub.s index 2c0082deb..17b225404 100644 --- a/libsrc/runtime/lsub.s +++ b/libsrc/runtime/lsub.s @@ -27,17 +27,17 @@ tossubeax: sec eor #$FF .if (.cpu .bitand ::CPU_ISET_65SC02) - adc (c_sp) ; 65SC02 version - saves 2 cycles + adc (c_sp) ; 65SC02 version - saves 2 cycles ldy #1 .else ldy #0 - adc (c_sp),y ; lo byte + adc (c_sp),y ; lo byte iny .endif pha ; Save low byte txa eor #$FF - adc (c_sp),y ; byte 1 + adc (c_sp),y ; byte 1 tax iny lda (c_sp),y diff --git a/libsrc/runtime/lxor.s b/libsrc/runtime/lxor.s index 8b17d8df6..6d9f7db3a 100644 --- a/libsrc/runtime/lxor.s +++ b/libsrc/runtime/lxor.s @@ -23,24 +23,24 @@ tosxor0ax: tosxoreax: .if (.cpu .bitand ::CPU_ISET_65SC02) - eor (c_sp) ; byte 0 + eor (c_sp) ; byte 0 ldy #1 .else ldy #0 - eor (c_sp),y ; byte 0 + eor (c_sp),y ; byte 0 iny .endif sta tmp1 txa - eor (c_sp),y ; byte 1 + eor (c_sp),y ; byte 1 tax iny lda sreg - eor (c_sp),y ; byte 2 + eor (c_sp),y ; byte 2 sta sreg iny lda sreg+1 - eor (c_sp),y ; byte 3 + eor (c_sp),y ; byte 3 sta sreg+1 lda tmp1 diff --git a/libsrc/runtime/popa.s b/libsrc/runtime/popa.s index c90f2be59..c1700071d 100644 --- a/libsrc/runtime/popa.s +++ b/libsrc/runtime/popa.s @@ -15,9 +15,9 @@ lda (c_sp) .else ldy #0 ; (2) - lda (c_sp),y ; (7) Read byte + lda (c_sp),y ; (7) Read byte .endif - inc c_sp ; (12) + inc c_sp ; (12) beq @L1 ; (14) rts ; (20) diff --git a/libsrc/runtime/popptr1.s b/libsrc/runtime/popptr1.s index caa43f3e0..45043dd27 100644 --- a/libsrc/runtime/popptr1.s +++ b/libsrc/runtime/popptr1.s @@ -12,13 +12,13 @@ .proc popptr1 ; 14 bytes (four usages = at least 2 bytes saved) ldy #1 - lda (c_sp),y ; get hi byte + lda (c_sp),y ; get hi byte sta ptr1+1 ; into ptr hi dey ; dey even for for 65C02 here to have Y=0 at exit! .if (.cpu .bitand ::CPU_ISET_65SC02) - lda (c_sp) ; get lo byte + lda (c_sp) ; get lo byte .else - lda (c_sp),y ; get lo byte + lda (c_sp),y ; get lo byte .endif sta ptr1 ; to ptr lo jmp incsp2 diff --git a/libsrc/runtime/popsreg.s b/libsrc/runtime/popsreg.s index 6c1a61a32..c7f667246 100644 --- a/libsrc/runtime/popsreg.s +++ b/libsrc/runtime/popsreg.s @@ -13,13 +13,13 @@ popsreg: pha ; save A ldy #1 - lda (c_sp),y ; get hi byte + lda (c_sp),y ; get hi byte sta sreg+1 ; store it .if (.cpu .bitand ::CPU_ISET_65SC02) - lda (c_sp) ; get lo byte + lda (c_sp) ; get lo byte .else dey - lda (c_sp),y ; get lo byte + lda (c_sp),y ; get lo byte .endif sta sreg ; store it pla ; get A back diff --git a/libsrc/runtime/pusha.s b/libsrc/runtime/pusha.s index 253612172..399423077 100644 --- a/libsrc/runtime/pusha.s +++ b/libsrc/runtime/pusha.s @@ -15,15 +15,15 @@ pusha0sp: ldy #$00 pushaysp: lda (c_sp),y -pusha: ldy c_sp ; (3) +pusha: ldy c_sp ; (3) beq @L1 ; (6) - dec c_sp ; (11) + dec c_sp ; (11) ldy #0 ; (13) - sta (c_sp),y ; (19) + sta (c_sp),y ; (19) rts ; (25) -@L1: dec c_sp+1 ; (11) - dec c_sp ; (16) - sta (c_sp),y ; (22) +@L1: dec c_sp+1 ; (11) + dec c_sp ; (16) + sta (c_sp),y ; (22) rts ; (28) diff --git a/libsrc/runtime/pushax.s b/libsrc/runtime/pushax.s index 247a38630..f77a9bcc3 100644 --- a/libsrc/runtime/pushax.s +++ b/libsrc/runtime/pushax.s @@ -20,21 +20,21 @@ pusha0: ldx #0 .proc pushax pha ; (3) - lda c_sp ; (6) + lda c_sp ; (6) sec ; (8) sbc #2 ; (10) - sta c_sp ; (13) + sta c_sp ; (13) bcs @L1 ; (17) - dec c_sp+1 ; (+5) + dec c_sp+1 ; (+5) @L1: ldy #1 ; (19) txa ; (21) - sta (c_sp),y ; (27) + sta (c_sp),y ; (27) pla ; (31) dey ; (33) .if (.cpu .bitand ::CPU_ISET_65SC02) - sta (c_sp) ; (37) + sta (c_sp) ; (37) .else - sta (c_sp),y ; (38) + sta (c_sp),y ; (38) .endif rts ; (44/43) diff --git a/libsrc/runtime/pushbsp.s b/libsrc/runtime/pushbsp.s index 64da06723..45ad93b12 100644 --- a/libsrc/runtime/pushbsp.s +++ b/libsrc/runtime/pushbsp.s @@ -11,7 +11,7 @@ pushbsp: ldy #0 pushbysp: - lda (c_sp),y ; get lo byte + lda (c_sp),y ; get lo byte jmp pusha0 ; promote to unsigned and push diff --git a/libsrc/runtime/pushwsp.s b/libsrc/runtime/pushwsp.s index 3bd164230..31c08d624 100644 --- a/libsrc/runtime/pushwsp.s +++ b/libsrc/runtime/pushwsp.s @@ -12,20 +12,20 @@ pushw0sp: ldy #3 pushwysp: - lda c_sp ; 3 + lda c_sp ; 3 sub #2 ; 4 - sta c_sp ; 3 + sta c_sp ; 3 bcs @L1 ; 3(+1) - dec c_sp+1 ; (5) -@L1: lda (c_sp),y ; 5 =16 + dec c_sp+1 ; (5) +@L1: lda (c_sp),y ; 5 =16 tax ; 2 dey ; 2 - lda (c_sp),y ; 5 + lda (c_sp),y ; 5 ldy #$00 ; 2 - sta (c_sp),y ; 5 + sta (c_sp),y ; 5 iny ; 2 txa ; 2 - sta (c_sp),y ; 5 + sta (c_sp),y ; 5 rts diff --git a/libsrc/runtime/regswap.s b/libsrc/runtime/regswap.s index 96080c823..17db9ee27 100644 --- a/libsrc/runtime/regswap.s +++ b/libsrc/runtime/regswap.s @@ -12,10 +12,10 @@ sta tmp1 ; Store count @L1: lda regbank,x ; Get old value pha ; Save it - lda (c_sp),y ; Get stack loc + lda (c_sp),y ; Get stack loc sta regbank,x ; Store new value pla - sta (c_sp),y ; Store old value + sta (c_sp),y ; Store old value inx iny dec tmp1 diff --git a/libsrc/runtime/regswap1.s b/libsrc/runtime/regswap1.s index 34cfd50eb..22cf170dc 100644 --- a/libsrc/runtime/regswap1.s +++ b/libsrc/runtime/regswap1.s @@ -11,10 +11,10 @@ lda regbank,x ; Get old value pha ; Save it - lda (c_sp),y ; Get stack loc + lda (c_sp),y ; Get stack loc sta regbank,x ; Store new value pla - sta (c_sp),y ; Store old value + sta (c_sp),y ; Store old value rts .endproc diff --git a/libsrc/runtime/regswap2.s b/libsrc/runtime/regswap2.s index 4f55fad40..07bc7c196 100644 --- a/libsrc/runtime/regswap2.s +++ b/libsrc/runtime/regswap2.s @@ -13,20 +13,20 @@ lda regbank,x ; Get old value pha ; Save it - lda (c_sp),y ; Get stack loc + lda (c_sp),y ; Get stack loc sta regbank,x ; Store new value pla - sta (c_sp),y ; Store old value + sta (c_sp),y ; Store old value ; Second byte iny lda regbank+1,x ; Get old value pha ; Save it - lda (c_sp),y ; Get stack loc + lda (c_sp),y ; Get stack loc sta regbank+1,x ; Store new value pla - sta (c_sp),y ; Store old value + sta (c_sp),y ; Store old value rts diff --git a/libsrc/runtime/rsub.s b/libsrc/runtime/rsub.s index c91b983dd..bacb3c7fc 100644 --- a/libsrc/runtime/rsub.s +++ b/libsrc/runtime/rsub.s @@ -24,12 +24,12 @@ tosrsubax: ldy #1 .else ldy #0 - sbc (c_sp),y ; lo byte + sbc (c_sp),y ; lo byte iny .endif sta tmp1 ; save lo byte txa - sbc (c_sp),y ; hi byte + sbc (c_sp),y ; hi byte tax lda tmp1 jmp addysp1 ; drop TOS, set condition codes diff --git a/libsrc/runtime/sub.s b/libsrc/runtime/sub.s index 07e7dc5e3..58ffb4c91 100644 --- a/libsrc/runtime/sub.s +++ b/libsrc/runtime/sub.s @@ -22,13 +22,13 @@ tossubax: ldy #1 .else ldy #0 - adc (c_sp),y ; Subtract low byte + adc (c_sp),y ; Subtract low byte iny .endif pha ; Save high byte txa eor #$FF - adc (c_sp),y ; Subtract high byte + adc (c_sp),y ; Subtract high byte tax ; High byte into X pla ; Restore low byte jmp addysp1 ; drop TOS diff --git a/libsrc/runtime/tosint.s b/libsrc/runtime/tosint.s index b924a53e3..2aaa19ccc 100644 --- a/libsrc/runtime/tosint.s +++ b/libsrc/runtime/tosint.s @@ -19,7 +19,7 @@ lda (c_sp) .else ldy #0 - lda (c_sp),y ; c_sp+1 + lda (c_sp),y ; c_sp+1 .endif ldy #2 sta (c_sp),y diff --git a/libsrc/runtime/toslong.s b/libsrc/runtime/toslong.s index 8e417367f..cf8eff031 100644 --- a/libsrc/runtime/toslong.s +++ b/libsrc/runtime/toslong.s @@ -18,7 +18,7 @@ tosulong: ldy #2 lda (c_sp),y .if (.cpu .bitand CPU_ISET_65SC02) - sta (c_sp) ; 65C02 version + sta (c_sp) ; 65C02 version iny ; Y = 3 .else ldy #0 @@ -44,7 +44,7 @@ toslong: ldy #2 lda (c_sp),y .if (.cpu .bitand CPU_ISET_65SC02) - sta (c_sp) ; 65C02 version + sta (c_sp) ; 65C02 version iny ; Y = 3 .else ldy #0 diff --git a/libsrc/runtime/zeropage.s b/libsrc/runtime/zeropage.s index 73b25bf0a..75856f751 100644 --- a/libsrc/runtime/zeropage.s +++ b/libsrc/runtime/zeropage.s @@ -10,7 +10,7 @@ .zeropage -c_sp: .res 2 ; Stack pointer +c_sp: .res 2 ; Stack pointer sreg: .res 2 ; Secondary register/high 16 bit for longs regsave: .res 4 ; Slot to save/restore (E)AX into ptr1: .res 2 diff --git a/libsrc/sim6502/exehdr.s b/libsrc/sim6502/exehdr.s index 0a0e4bb26..224b2af2d 100644 --- a/libsrc/sim6502/exehdr.s +++ b/libsrc/sim6502/exehdr.s @@ -24,6 +24,6 @@ .else .error Unknown CPU type. .endif - .byte c_sp ; c_sp address + .byte c_sp ; c_sp address .addr __MAIN_START__ ; load address .addr startup ; reset address diff --git a/libsrc/supervision/crt0.s b/libsrc/supervision/crt0.s index 931ec8be8..1cfba1845 100644 --- a/libsrc/supervision/crt0.s +++ b/libsrc/supervision/crt0.s @@ -34,7 +34,7 @@ reset: lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) ldx #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr jsr initlib jsr _main _exit: jsr donelib diff --git a/libsrc/telestrat/crt0.s b/libsrc/telestrat/crt0.s index 430c4f8c8..aa32ed0d0 100644 --- a/libsrc/telestrat/crt0.s +++ b/libsrc/telestrat/crt0.s @@ -75,7 +75,7 @@ L1: lda c_sp,x lda #<(__MAIN_START__ + __MAIN_SIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors. diff --git a/libsrc/vic20/crt0.s b/libsrc/vic20/crt0.s index 64ccf6085..189114f5d 100644 --- a/libsrc/vic20/crt0.s +++ b/libsrc/vic20/crt0.s @@ -46,7 +46,7 @@ L1: lda c_sp,x lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__) sta c_sp - stx c_sp+1 ; Set argument stack ptr + stx c_sp+1 ; Set argument stack ptr ; Call the module constructors.