Personal tools
You are here: Home Systems NCD 88k X-Terminal hello.s
Document Actions

hello.s

by Maki Kato last modified 2004-12-31 01:05

this is the hello world program. Making a call to the printf like routine(hardcoded) in the ROM. This probably only works with the 2.7.3 rom.

.text

;; The following is the required magic for NCD to like the image
br start
.int 0,0,1 /* 1 is for ignoring CRC16 */
string "Xncd19C\000"
.int 0 /* CRC16 value would go here */

start: or.u r2, r0, hi16(L1)
or.u r3, r0, hi16(0x04013F6C)
or r3, r3, lo16(0x04013F6C)
;; it would be a bsr.n 0x04013F6C
jmp.n r3
or r2, r2, lo16(L1)

L1:
ascii "hello world\nhello Joanna.\n\000"


Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: