Terminal control/Clear the screen: Difference between revisions

m
Line 11:
<lang 11l>os:(‘clear’)</lang>
 
=={{header|6502 Assembly}}==
===Commodore 64===
{{works with|http://vice-emu.sourceforge.net/ VICE}}
This example has been written for the C64 and uses the CHROUT KERNEL routine.
Line 42 ⟶ 43:
; see https://en.wikipedia.org/wiki/PETSCII
</lang>
===6502js/6502asm/easy6502===
 
{{works with|http://www.6502asm.com/ 6502asm.com|1.2}}
{{works with|http://www.6502asm.com/beta/index.html 6502asm.com|1.5 beta}}
Line 78 ⟶ 79:
bne clearscreen
</lang>
{{works with|===Nintendo Entertainment System}}===
 
{{works with|Nintendo Entertainment System}}
It's best to do this during forced blank (i.e. display is inactive), as this loop is most likely too slow to finish before vBlank is over. This code assumes that your game's character ROM has a "blank" tile at tile index $00. If it doesn't, use whatever index you consider to be a "blank tile." Also, this only clears the top-left nametable, which is all the user can see if no scrolling has taken place. If the scroll position of the screen isn't (0,0), there will still be graphics left over on screen.
 
1,489

edits