URL
https://opencores.org/ocsvn/rtftextcontroller/rtftextcontroller/trunk
Subversion Repositories rtftextcontroller
[/] [rtftextcontroller/] [trunk/] [software/] [rtfTextControllerSampleUsageCode.x68] - Rev 29
Go to most recent revision | Compare with Previous | Blame | View Log
;------------------------------------------------------------------------------; Code Sample from system bios ROM.;------------------------------------------------------------------------------TEXTSCR EQU 0xFFD00000COLORSCR EQU 0xFFD10000TEXTCTRL EQU 0xFFDA0000TEXT_COLS EQU 0xFFDA0000TEXT_ROWS EQU 0xFFDA0002TEXT_CURPOS EQU 0xFFDA0016;------------------------------------------------------------------------------; Clear the screen and the screen color memory; We clear the screen to give a visual indication that the system; is working at all.;------------------------------------------------------------------------------;ClearScreen:move.w TEXT_COLS,d1 ; calc number to clearmulu.w TEXT_ROWS,d1move.w #32,d0 ; space charactermove.l #TEXTSCR,a0 ; text screen addresscsj4:move.w d0,(a0)+dbeq d1,csj4move.w TEXT_COLS,d1 ; calc number to clearmulu.w TEXT_ROWS,d1move.w ScreenColor,d0 ; a nice color blue, light bluemove.l #COLORSCR,a0 ; text color addresscsj3:move.w d0,(a0)+dbeq d1,csj3rts;------------------------------------------------------------------------------; Scroll text on the screen upwards;------------------------------------------------------------------------------;ScrollUp:movem.l d0/d1/d2/a0,-(a7)move.w TEXT_COLS,d0 ; calc number of chars to scrollmulu.w TEXT_ROWS,d0sub.w TEXT_COLS,d0 ; one less rowlea TEXTSCR,a0move.w TEXT_COLS,d2asl.w #1,d2scrup1:move.w (a0,d2.w),(a0)+dbeq d0,scrup1move.w TEXT_ROWS,d1subi.w #1,d1jsr BlankLinemovem.l (a7)+,d0/d1/d2/a0rts;------------------------------------------------------------------------------; Blank out a line on the display; line number to blank is in D1.W;------------------------------------------------------------------------------;BlankLine:movem.l d0/a0,-(a7)move.w TEXT_COLS,d0mulu.w d1,d0 ; d0 = row * colsasl.w #1,d0 ; *2 for moving words, not bytesadd.l #TEXTSCR,d0 ; add in screen basemove.l d0,a0move.w TEXT_COLS,d0 ; d0 = number of chars to blank outblnkln1:move.w #' ',(a0)+dbeq d0,blnkln1movem.l (a7)+,d0/a0rts
Go to most recent revision | Compare with Previous | Blame | View Log
