I am trying to write an assembly language program that prints a first name--e.g., Thomas. It is supposed to use the .ASCII pseudo-operation to store the characters at the bottom of the program, and the CHARO instruction to output the characters. When I look at an example in the textbook:
;Stan Warford
;January 13, 2009
;A program to output "Hi"
;
CHARO 0x0007,d ;Output 'H'
CHARO 0x0008,d ;Output 'i'
STOP
.ASCII "Hi"
.END
This outputs "Hi" correctly. However, when I try to write a program that outputs
Thomas, it doesn't work. What I have:
CHARO 0x0004 ,d ;output T
CHARO 0x0005 ,d ;output h
CHARO 0x0006 ,d ;output o
CHARO 0x0007 ,d ;output m
CHARO 0x0008 ,d ;output a
CHARO 0x0009 ,d ;output s
STOP
.ASCII "Thomas"
.END
When I run this, nothing is being output to the screen. I am trying to run this on the Pep/8 simulator. Am I missing something really obvious here? Is there a specific hex value I need to start with when using the CHARO commands--e.g., 0x0007? Thanks in advance for the advice.