From: Christian Groessler Date: Thu, 19 Sep 2013 20:36:22 +0000 (+0200) Subject: Use '.ifdef' and '.ifndef' instead of '.if .defined' and '.if .not .defined'. X-Git-Tag: V2.15~223^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a7cb64d2ec44c6bbbe4ed2dab7f742c794295d9;p=cc65 Use '.ifdef' and '.ifndef' instead of '.if .defined' and '.if .not .defined'. --- diff --git a/libsrc/atari/cgetc.s b/libsrc/atari/cgetc.s index cf853f5ce..54fe85bb4 100644 --- a/libsrc/atari/cgetc.s +++ b/libsrc/atari/cgetc.s @@ -14,7 +14,7 @@ _cgetc: jsr setcursor lda #12 sta ICAX1Z ; fix problems with direct call to KEYBDV -.if .not .defined(__ATARIXL__) +.ifndef __ATARIXL__ jsr @1 .else jsr KEYBDV_handler @@ -22,7 +22,7 @@ _cgetc: ldx #0 rts -.if .not .defined(__ATARIXL__) +.ifndef __ATARIXL__ @1: lda KEYBDV+5 pha lda KEYBDV+4 diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index 9bf5771d4..07f2e3be7 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -16,7 +16,7 @@ .import __STARTUP_LOAD__, __BSS_LOAD__ .import __RESERVED_MEMORY__ .import __RAM_START__, __RAM_SIZE__ -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .import __STACKSIZE__ .import sram_init .import scrdev @@ -34,7 +34,7 @@ .word $FFFF -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .segment "MAINHDR" .endif @@ -55,7 +55,7 @@ start: -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ jsr sram_init .endif @@ -68,7 +68,7 @@ start: tsx stx spsave -.if .not .defined(__ATARIXL__) +.ifndef __ATARIXL__ ; Report memory usage @@ -101,7 +101,7 @@ start: jsr initlib .if 0 -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .import __heapadd .import pushax .import __RAM_BELOW_ROM_START__ @@ -165,7 +165,7 @@ _exit: jsr donelib ; Run module destructors lda APPMHI_save+1 sta APPMHI+1 -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ ; Atari XL target stuff... @@ -224,7 +224,7 @@ _exit: jsr donelib ; Run module destructors spsave: .res 1 old_shflok: .res 1 old_lmargin: .res 1 -.if .not .defined(__ATARIXL__) +.ifndef __ATARIXL__ APPMHI_save: .res 2 .endif diff --git a/libsrc/atari/irq.s b/libsrc/atari/irq.s index 597ad9d60..3fbdc971b 100644 --- a/libsrc/atari/irq.s +++ b/libsrc/atari/irq.s @@ -39,7 +39,7 @@ doneirq: IRQStub: cld ; Just to be sure -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ pha lda PORTB pha @@ -47,7 +47,7 @@ IRQStub: sta PORTB ; disable ROM @@@ TODO: update CHARGEN .endif jsr callirq ; Call the functions -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ pla sta PORTB pla diff --git a/libsrc/atari/libref.s b/libsrc/atari/libref.s index 6d93a0b8e..171bd6de6 100644 --- a/libsrc/atari/libref.s +++ b/libsrc/atari/libref.s @@ -7,7 +7,7 @@ em_libref := _exit joy_libref := _exit -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .import CIO_handler tgi_libref := CIO_handler .else diff --git a/libsrc/atari/ostype.s b/libsrc/atari/ostype.s index 7a3342d2a..4fbeaaf70 100644 --- a/libsrc/atari/ostype.s +++ b/libsrc/atari/ostype.s @@ -40,7 +40,7 @@ .export _get_ostype -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .include "atari.inc" .import __CHARGEN_START__ diff --git a/libsrc/atari/save_area.s b/libsrc/atari/save_area.s index 2fddce017..5495be8ca 100644 --- a/libsrc/atari/save_area.s +++ b/libsrc/atari/save_area.s @@ -6,7 +6,7 @@ ; Christian Groessler, chris@groessler.org, 2013 ; -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .export SAVMSC_save .export MEMTOP_save diff --git a/libsrc/atari/shadow_ram_handlers.s b/libsrc/atari/shadow_ram_handlers.s index c01f56ddb..9714644ad 100644 --- a/libsrc/atari/shadow_ram_handlers.s +++ b/libsrc/atari/shadow_ram_handlers.s @@ -8,7 +8,7 @@ DEBUG = 1 USEWSYNC= 1 CHKBUF = 1 ; check if bounce buffering is needed (bounce buffering is always done if set to 0) -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ SHRAM_HANDLERS = 1 .include "atari.inc" @@ -1147,4 +1147,4 @@ orig_len: .res 2 req_len: .res 2 retlen: .res 2 -.endif ; .if .defined(__ATARIXL__) +.endif ; .ifdef __ATARIXL__ diff --git a/libsrc/atari/shadow_ram_prepare.s b/libsrc/atari/shadow_ram_prepare.s index 4dd0338b9..be40baed3 100644 --- a/libsrc/atari/shadow_ram_prepare.s +++ b/libsrc/atari/shadow_ram_prepare.s @@ -11,7 +11,7 @@ DEBUG = 1 -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .export sramprep .import __SRPREP_LOAD__, __SRPREPCHNK_LAST__ @@ -403,4 +403,4 @@ screen_device_length = * - screen_device .word INITAD+1 .word sramprep -.endif ; .if .defined(__ATARIXL__) +.endif ; .ifdef __ATARIXL__ diff --git a/libsrc/atari/system_check.s b/libsrc/atari/system_check.s index b1d80b0c2..b01311a4b 100644 --- a/libsrc/atari/system_check.s +++ b/libsrc/atari/system_check.s @@ -13,7 +13,7 @@ DEBUG = 1 -.if .defined(__ATARIXL__) +.ifdef __ATARIXL__ .export syschk .import __SYSCHK_LOAD__ @@ -154,4 +154,4 @@ end: .word INITAD+1 .word syschk -.endif ; .if .defined(__ATARIXL__) +.endif ; .ifdef __ATARIXL__