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.
This commit is contained in:
Anachronaut
2024-10-29 21:04:03 -04:00
committed by GitHub
parent f9308338c4
commit a58fb3d694
8 changed files with 255 additions and 112 deletions
+19 -7
View File
@@ -8,13 +8,25 @@
#Include print.asm
#Program
Start:
SETD myString ; Set the Data Pointer to the string we want to print.
CALL printString ; Call the subroutine.
CALL lineFeed ; Call the linefeed subroutine.
HALT ; Stop the CPU.
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!"
MyString:
"Hello, World! "
MyDecimal:
0d42
MyMessage:
" is the great answer."