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
         ldx     #0
         rts
 
-.if .not .defined(__ATARIXL__)
+.ifndef __ATARIXL__
 @1:     lda     KEYBDV+5
         pha
         lda     KEYBDV+4
 
         .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
 
         .word   $FFFF
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 .segment        "MAINHDR"
 .endif
 
 
 start:
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
         jsr     sram_init
 .endif
 
         tsx
         stx     spsave
 
-.if .not .defined(__ATARIXL__)
+.ifndef __ATARIXL__
 
 ; Report memory usage
 
         jsr     initlib
 
 .if 0
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
         .import __heapadd
         .import pushax
         .import __RAM_BELOW_ROM_START__
         lda     APPMHI_save+1
         sta     APPMHI+1
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
 ; Atari XL target stuff...
 
 spsave:         .res    1
 old_shflok:     .res    1
 old_lmargin:    .res    1
-.if .not .defined(__ATARIXL__)
+.ifndef __ATARIXL__
 APPMHI_save:    .res    2
 .endif
 
 
 
 IRQStub:
         cld                             ; Just to be sure
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
        pha
        lda     PORTB
        pha
        sta     PORTB                   ; disable ROM  @@@ TODO: update CHARGEN
 .endif
         jsr     callirq                 ; Call the functions
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
        pla
        sta     PORTB
        pla
 
 
 em_libref       := _exit
 joy_libref      := _exit
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
         .import CIO_handler
 tgi_libref      := CIO_handler
 .else
 
 
         .export         _get_ostype
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
         .include "atari.inc"
         .import __CHARGEN_START__
 
 ; Christian Groessler, chris@groessler.org, 2013
 ;
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
 .export                SAVMSC_save
 .export                MEMTOP_save
 
 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"
 req_len:               .res    2
 retlen:                        .res    2
 
-.endif ; .if .defined(__ATARIXL__)
+.endif ; .ifdef __ATARIXL__
 
 
 DEBUG   =       1
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
         .export         sramprep
         .import         __SRPREP_LOAD__, __SRPREPCHNK_LAST__
         .word   INITAD+1
         .word   sramprep
 
-.endif  ; .if .defined(__ATARIXL__)
+.endif  ; .ifdef __ATARIXL__
 
 
 DEBUG  =       1
 
-.if .defined(__ATARIXL__)
+.ifdef __ATARIXL__
 
        .export         syschk
         .import         __SYSCHK_LOAD__
         .word   INITAD+1
         .word   syschk
 
-.endif ; .if .defined(__ATARIXL__)
+.endif ; .ifdef __ATARIXL__