* Program 1. * A simple program to introduce the 68HC11 integrated windows development * environment. * * un-comment either of the following two lines by removing a semicolon. * The first targets your code for the simulator, the second the 12c trainer board. $SET simulate ;$SETNOT simulate $include "12c_io.asm" * This line sets the origin at 100h in RAM ORG 100 SIGNON: DW 'CMPE12C Simulator' DB NULL PROMPT: DW '>' DB NULL ************************************************************************** * Your program starts here indicated by the label "main:". After startup * code in 12_io.asm is done, it jumps to this label and continues running. * Begin by initializing the stack frame by setting the stack pointer to * somewhere nice, like the top of the far-heap in RAM. Remember, the stack * builds downward in memory (see Motorola Ref. Manual Sec. 6.1.3, pg 6-3). main: ldx #7bffh ;x <- 0x7bff txs ;sp <- x * The internal uart must be setup for serial communications jsr SETUPSCI ldx #SIGNON jsr OUTSTRING loop: ldx #PROMPT ;address of prompt jsr OUTSTRING ;write out sci jsr INSCI ;get a character from sci, returns in A jsr OUTSCI ;write A to the sci jsr OUTCRLF ;write cr/lf to sci jmp loop