diff --git a/README.md b/README.md index 518738d..55cfea0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/include/crt.c b/include/crt.c index 4f82061..24a5568 100644 --- a/include/crt.c +++ b/include/crt.c @@ -235,6 +235,7 @@ w0: // Clear BSS Segment +#ifndef NOBSSCLEAR lda #BSSStart @@ -264,7 +265,8 @@ l2: dey sta (ip), y bne l2 w2: - +#endif +#ifndef NOZPCLEAR ldx #StackEnd - 2