1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-26 06:28:06 +11:00

Compare commits

..

No commits in common. "c57f2d697388ff2b7371ac8aed7e51319a034ea5" and "f4871d4d58b3614b6fb4c5c49462a3620684aacf" have entirely different histories.

4 changed files with 142 additions and 168 deletions

View File

@ -446,187 +446,187 @@
...
.
....
. .
....
.
.
...
. .
...
...
. .
.
. .
...
.
.
...
. .
...
...
. .
.....
.
....
..
. .
.
...
.
...
. .
...
. .
..
.
.
...
. .
. .
.
.
.
.
.
.
. .
..
. .
. .
..
. .
. .
..
.
.
.
..
. .
. . .
. .
. .
. .
...
....
. .
. .
....
. .
. .
....
...
. .
. .
. .
...
...
. .
...
.
.
.
. .
...
. .
....
. .
. .
. .
. .
. .
....
.....
.
.
....
.
.
.....
.....
.
.
....
.
.
.
...
.
.
. .
.
. ..
. .
. .
...
. .
. .
. .
.....
. .
. .
. .
...
.
.
.
.
.
...
..
.
.
.
.
. .
...
. .
. .
..
.
..
. .
. .
.
.
.
.
.
.
.....
. .
.. ..
. . .
. .
. .
. .
. .
. .
.. .
.. .
. . .
. ..
. ..
. .
...
. .
. .
. .
. .
. .
...
....
. .
. .
....
.
.
.
...
.
...
.
...
.
.
..
. .
. .
. .
. .
...
. .
. .
. .
. .
.
. .
. .
. .
. . .
. .
. ..
....
....
. .
. .
.
. .
. .
....
. .
. .
. .
...
. .
. .
.
.
.
...
.
. .
...
.....
.
.
.
.
.
.
. .
. .
. .
. .
. .
. .
...
. .
. .
. .
. .
. .
. .
.
. .
. .
. .
. .
. .
.. ..
. . .
. .
. .
. .
.
. .
. .
. .
. .
. .
. .
.
.
.
.
.....
. .
.
.
.
. .
.....
..
.

Binary file not shown.

View File

@ -2,9 +2,6 @@
;
; Implement PutC on TI-84+ (for now)'s LCD screen.
;
; Note that "X-increment" and "Y-increment" work in the opposite way than what
; most people expect. Y moves left and right, X moves up and down.
;
; *** Requirements ***
; fnt/mgm
;
@ -13,7 +10,6 @@
.equ LCD_PORT_DATA 0x11
.equ LCD_CMD_6BIT 0x00
.equ LCD_CMD_8BIT 0x01
.equ LCD_CMD_DISABLE 0x02
.equ LCD_CMD_ENABLE 0x03
.equ LCD_CMD_XINC 0x05
@ -22,12 +18,6 @@
.equ LCD_CMD_ROW 0x80
.equ LCD_CMD_CONTRAST 0xc0
; *** Variables ***
; Current row being written on. In terms of pixels, not of glyphs. During a
; linefeed, this increases by FNT_HEIGHT+1.
.equ LCD_CURROW LCD_RAMSTART
.equ LCD_RAMEND @+1
; *** Code ***
lcdInit:
; Enable the LCD
@ -82,22 +72,18 @@ lcdOff:
; Set LCD's current column to A
lcdSetCol:
push af
; The col index specified in A is compounded with LCD_CMD_COL
add a, LCD_CMD_COL
call lcdWait
out (LCD_PORT_CMD), a
pop af
ret
; Set LCD's current row to A
lcdSetRow:
push af
; The col index specified in A is compounded with LCD_CMD_COL
add a, LCD_CMD_ROW
call lcdWait
out (LCD_PORT_CMD), a
pop af
ret
; Send the 5x7 glyph that HL points to to the LCD, at its current position.
@ -108,7 +94,9 @@ lcdSendGlyph:
push bc
push hl
ld a, (LCD_CURROW)
; For the purpose of this program, we only write on the first line.
; We can assume that we always start at row 0.
xor a
call lcdSetRow
ld b, 7
@ -141,20 +129,7 @@ lcdSendGlyph:
pop af
ret
; Changes the current line and go back to leftmost column
lcdLinefeed:
push af
ld a, (LCD_CURROW)
add a, FNT_HEIGHT+1
ld (LCD_CURROW), a
xor a
call lcdSetCol
pop af
ret
lcdPutC:
cp ASCII_LF
jp z, lcdLinefeed
push hl
call fntGet
jr nz, .end

View File

@ -26,10 +26,9 @@
.equ FNT_WIDTH 5
.equ FNT_HEIGHT 7
.inc "fnt/mgm.asm"
.equ LCD_RAMSTART RAMSTART
.inc "ti/lcd.asm"
.inc "ti/kbd.asm"
.equ STDIO_RAMSTART LCD_RAMEND
.equ STDIO_RAMSTART RAMSTART
.equ STDIO_GETC GetC
.equ STDIO_PUTC lcdPutC
.inc "stdio.asm"