; should assemble this file with and without the
; single object module swicth enabled.
; a68 -o example ;three object module files
; a68 example ;one object module file example.obj
.org h'20 ;start assembly at location 20 hex.
.segment .memory ;declare a new segmemt for ram memory
.memory ;select segment .memory as active(locaton counter)
;for the .code segment(created by the assembler) is
;saved for when we switch back.
.org h'8000 ;Ram starts at 8000 hex.
var1: .rs 1 ;variable 1
var16: .rs 2 ;16 bit variable
array: .rs 100*2 ;100 16 bit word array
.eject ;lets start on a fresh page of paper.
;notice that an page eject does not print!
;test list off
.command -l ;this should not print
.db "this is a .db test (fcc on some oem assemblers)"
.command +l ;this also should not print
;this line should print
.code ;switch back to code segment
; origin is where we left off.
loop: .dw loop,loop2
.equ cr,13 ;equated idienifiers are constant.
.set temp,23 ;set identifiers may be re-set.
.db 6,7,"this is a test\r\n\0"
.page ;start on a new 256 byte boundary.
loop2: .db loop2 >> 3
.segment .rom2,-x'800 ;my programmer only likes 0..n addresses
.db "this is possibly an external rom programmed seperately."
.end loop ;end of assembly, specifying start address.