M68000 AmigaOS
This commit is contained in:
33
a/assembler_m68000_amigaos.asm
Normal file
33
a/assembler_m68000_amigaos.asm
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
; "Hello World" in Motorola 68000 machine language, for AmigaOS
|
||||||
|
|
||||||
|
ExecBase = 4
|
||||||
|
OpenLibrary = -552
|
||||||
|
CloseLibrary = -414
|
||||||
|
PutStr = -948
|
||||||
|
|
||||||
|
section "main", code
|
||||||
|
|
||||||
|
; open "dos.library"
|
||||||
|
|
||||||
|
move.l ExecBase, a6
|
||||||
|
lea lib, a1
|
||||||
|
moveq #0, d0
|
||||||
|
jsr (OpenLibrary, a6)
|
||||||
|
move.l d0, a6
|
||||||
|
|
||||||
|
; print the message
|
||||||
|
|
||||||
|
move.l #msg, d1
|
||||||
|
jsr (PutStr, a6)
|
||||||
|
|
||||||
|
; close the library, and exit with code 0
|
||||||
|
|
||||||
|
move.l a6, a1
|
||||||
|
move.l ExecBase, a6
|
||||||
|
jsr (CloseLibrary, a6)
|
||||||
|
|
||||||
|
moveq #0, d0
|
||||||
|
rts
|
||||||
|
|
||||||
|
lib dc.b "dos.library", 0
|
||||||
|
msg dc.b "Hello World!\n", 0
|
||||||
Reference in New Issue
Block a user