R32V2020 Screen Clear Example

From Land Boards Wiki
Revision as of 12:00, 10 April 2022 by Blwikiadmin (talk | contribs) (Created page with "<pre>; Clear the screen routine clearScreen: ads r5,r0,r0 ; start of screen character memory ads r8,r0,r0 ; clear the character lil r8,0x0020 ; fill with spaces ads r9,r0,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
; Clear the screen routine
clearScreen:
	ads	r5,r0,r0	; start of screen character memory
	ads	r8,r0,r0	; clear the character
	lil	r8,0x0020	; fill with spaces
	ads	r9,r0,r0	; screen count
	lil	r9,0x7FE	; loopCount	
looper:
	spb	r8			; put the character to the screen
	ads	r5,r5,r1	; Increment screen pointer
	ads	r9,r9,r2	; decrement character counter
	bne	looper		; loop until complete
	bra	doneClear