-
Notifications
You must be signed in to change notification settings - Fork 3
Write Character to Screen Example
Doug Gilliland edited this page May 28, 2019
·
2 revisions
; initializing and loading of first character ads r5,r0,r0 ; init r5 to start of screen character memory ads r8,r0,r0 ; clear the character (not necessary since screen is byte memory) lil r8,0x0048 ; Pass character to print (ASCII 'H') in r8 ads r9,r7,r1 ; Save PC (plus 1) into r9 - putChar will increment to skip the bra bra putChar ; Call putChar routine ; putChar routine putChar: spb r8 ; write character to peripheral bus ads r5,r5,r1 ; Go to the next character position ads r7,r9,r1 ; return to calling routine (r9 is the calling address)