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:
+19
-7
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user