Add options to disable BSS clear on startup
This commit is contained in:
parent
b48b8b836d
commit
8fbe96b9ac
|
@ -141,6 +141,8 @@ A list of source files can be provided.
|
|||
* -dNOLONG : no support for long in printf
|
||||
* -dNOFLOAT : no float in printf
|
||||
* -dHEAPCHECK : check heap allocate and free and jam if heap full or free out of range
|
||||
* -dNOBSSCLEAR : don't clear BSS segment on startup
|
||||
* -dNOZPCLEAR : don't clear zeropage BSS segment on startup
|
||||
|
||||
#### Supported target machines
|
||||
|
||||
|
|
|
@ -235,6 +235,7 @@ w0:
|
|||
|
||||
// Clear BSS Segment
|
||||
|
||||
#ifndef NOBSSCLEAR
|
||||
lda #<BSSStart
|
||||
sta ip
|
||||
lda #>BSSStart
|
||||
|
@ -264,7 +265,8 @@ l2: dey
|
|||
sta (ip), y
|
||||
bne l2
|
||||
w2:
|
||||
|
||||
#endif
|
||||
#ifndef NOZPCLEAR
|
||||
ldx #<ZeroStart
|
||||
cpx #<ZeroEnd
|
||||
beq w3
|
||||
|
@ -273,6 +275,7 @@ l3: sta $00, x
|
|||
cpx #<ZeroEnd
|
||||
bne l3
|
||||
w3:
|
||||
#endif
|
||||
lda #<StackEnd - 2
|
||||
sta sp
|
||||
lda #>StackEnd - 2
|
||||
|
|
Loading…
Reference in New Issue