Files
SplitBit-Emulator/Programs/printHello.asm
T
Anachronaut a58fb3d694 Added new instructions.
Added CCF - Clear Carry Flag
Added BRC - Branch on Carry Flag
Improved CALL and RET - All registers but status now saved and restored.
2024-10-29 21:04:03 -04:00

33 lines
924 B
NASM

; printHello.asm
; As a demonstration of the new print routines, here's a new implementation for hello.asm
; Anachronaut
; 10/27/2024
; Include the subroutine file.
#Include print.asm
#Program
start:
SETD MyString ; Set the Data Pointer to the start of MyString.
CALL printString ; Call the string printing subroutine.
CALL lineFeed ; Call the line feed subroutine to end the line.
SETD MyDecimal ; Set the Data Pointer to the value to print as a decimal.
CALL printDecimal ; Call the decimal printing subroutine.
SETD MyMessage ; Set the Data Pointer to another string.
CALL printString ; Call the string printing subroutine again.
CALL lineFeed ; Call the line feed subroutine to end the line.
HALT ; Stop the program.
#Data
MyString:
"Hello, World! "
MyDecimal:
0d42
MyMessage:
" is the great answer."