User Tools

Site Tools


notes:atari:mads

MADS

Constants:

TIMER   = $021C
ROM     = $FF

Labels - pointers to memory locations:

address .WORD         ; 'address' is a label
loop    BIT exitflag  ; 'loop' is a label

Procedures:

    .PROC proc
    .ENDP

A nested macro and a procedure:

    .PROC proc
    .PROC inproc
 
    .MACRO inner_macro
    .ENDM
 
    .ENDP
    .ENDP

Local sections:

    .LOCAL
inlabel         ; a local inner label
    .ENDL

Macros:

    .MACRO macro_name
    .ENDM

Structs:

    .STRUCT Record
    player .byte
    score .word
    lives .byte
    .ENDS

Enums:

    .ENUM Players
    one = 1
    two = 2
    .ENDE

Conditional compilation section:

    .IF SWITCH=1
         ...
    .ENDIF

Variables:

    .VAR one = 1
    .ZPVAR two = 2

Include a source file. Absolute and relative paths are supported:

    ICL "example.asm"
    ICL "example"       ; MADS supports the default extension '.asm'
    ICL "..\anotherexample.asm"
    ICL "C:\Temp\file.asm"

Include a binary file:

    INS "file.bin"
    .GET "file.bin"

Pages:

pages   .PAGES     ; Pages section
        .ENDPG

Repeat section:

repeat  .REPT 2
        .ENDR
notes/atari/mads.txt · Last modified: 2019/06/25 by leszek