Refined the comments in the target start-up files.
Fixed typo errors. Made the comments consistent across all those files.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
;
|
||||
; Startup code for cc65 (C16 version)
|
||||
;
|
||||
; Note: The C16 is actually the Plus/4 with just 16KB of memory. So many
|
||||
; things are similar here, and we even use the plus4.inc include file.
|
||||
; Note: The C16 is actually the Plus/4 with just 16KB of memory. So, many
|
||||
; things are similar here; and, we even use the plus4.inc include file.
|
||||
;
|
||||
|
||||
.export _exit
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
Start:
|
||||
|
||||
; Save the zero page locations we need
|
||||
; Save the zero-page locations that we need.
|
||||
|
||||
ldx #zpspace-1
|
||||
L1: lda sp,x
|
||||
@@ -30,16 +30,16 @@ L1: lda sp,x
|
||||
dex
|
||||
bpl L1
|
||||
|
||||
; Switch to second charset
|
||||
; Switch to the second charset.
|
||||
|
||||
lda #14
|
||||
jsr BSOUT
|
||||
|
||||
; Clear the BSS data
|
||||
; Clear the BSS data.
|
||||
|
||||
jsr zerobss
|
||||
|
||||
; Save system stuff and setup the stack
|
||||
; Save some system stuff; and, set up the stack.
|
||||
|
||||
tsx
|
||||
stx spsave ; save system stk ptr
|
||||
@@ -53,20 +53,20 @@ L1: lda sp,x
|
||||
MemOk: stx sp
|
||||
sty sp+1 ; set argument stack ptr
|
||||
|
||||
; Call module constructors
|
||||
; Call the module constructors.
|
||||
|
||||
jsr initlib
|
||||
|
||||
; Push arguments and call main()
|
||||
; Push the command-line arguments; and, call main().
|
||||
|
||||
jsr callmain
|
||||
|
||||
; Call module destructors. This is also the _exit entry.
|
||||
; Call the module destructors. This is also the exit() entry.
|
||||
|
||||
_exit: pha ; Save the return code on stack
|
||||
jsr donelib ; Run module destructors
|
||||
|
||||
; Copy back the zero page stuff
|
||||
; Copy back the zero-page stuff.
|
||||
|
||||
ldx #zpspace-1
|
||||
L2: lda zpsave,x
|
||||
@@ -74,17 +74,17 @@ L2: lda zpsave,x
|
||||
dex
|
||||
bpl L2
|
||||
|
||||
; Store the return code into ST
|
||||
; Store the return code into BASIC's status variable.
|
||||
|
||||
pla
|
||||
sta ST
|
||||
|
||||
; Restore the stack pointer
|
||||
; Restore the stack pointer.
|
||||
|
||||
ldx spsave
|
||||
txs
|
||||
|
||||
; Back to BASIC
|
||||
; Back to BASIC.
|
||||
|
||||
rts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user