== apollo_asm ==

open this code in devpac, ctrl+a to assemble it.
open a shell, go to the drawer where this source file is stored.
execute. it should display a message.

* print message on console
* credits pisklak for the code

    include exec/types.i
    include exec/libraries.i
    include exec/exec_lib.i
    include dos/dos_lib.i

LF  EQU 10  

*   CALLSYS  MACRO
*   LINKLIB  _LVO\1,\2
*   ENDM
    
    move.l   $4,_ExecBase
    lea      _DosName,A1
    move.l   #0,d0
    CALLEXEC OpenLibrary
    move.l   d0,_DOSBase
    
    CALLDOS  Output
    move.l   d0,_stdout
    
    move.l   _stdout,d1
    move.l   #PiskMessage,d2
    move.l   #PiskMessage_SIZEOF,d3
       	  
    CALLDOS  Write

Close_Dos
    move.l   _DOSBase,A1
    CALLEXEC CloseLibrary
    
ENDPRG  RTS

_ExecBase    dc.l    0   
_DOSBase     dc.l    0
_DosName     dc.b    "dos.library",0
_stdout      dc.l    0

PiskMessage  dc.b    "Vampire Rulez ! 68k ASM rulez !!!",LF,LF,LF,0
PiskMessage_SIZEOF   EQU *-PiskMessage
  • print_message_on_console.txt
  • Last modified: 2016/08/27 13:59
  • (external edit)