Skip to content

Commit 09c8703

Browse files
author
Ian Seyler
committed
Created sysvar variable for os_font
1 parent db8430c commit 09c8703

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/drivers/lfb/lfb.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lfb_init:
1717
push rax
1818

1919
; Convert font data to pixel data. The default 12x6 font is 72 pixels per glyph. 288 bytes per.
20-
mov rdi, 0x1C0000
20+
mov rdi, os_font
2121
mov rsi, font_data
2222
xor ebx, ebx
2323
next_char:
@@ -369,7 +369,7 @@ load_char:
369369
pop rax ; Restore the character to display
370370

371371
; Copy glyph data to Linear Frame Buffer
372-
mov rsi, 0x1C0000 ; Font pixel data
372+
mov rsi, os_font ; Font pixel data
373373
mov ecx, [lfb_glyph_bytes] ; Bytes per glyph
374374
mul ecx ; EDX:EAX := EAX * ECX
375375
xor edx, edx ; Counter for font height

src/sysvar.asm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ os_rx_desc: equ 0x00000000001A0000 ; 0x1A0000 -> 0x1A7FFF 32K Ethernet receive
4747
os_tx_desc: equ 0x00000000001A8000 ; 0x1A8000 -> 0x1AFFFF 32K Ethernet transmit descriptors
4848
os_PacketBuffers: equ 0x00000000001B0000 ; 0x1B0000 -> 0x1BFFFF 64K Ethernet packet buffers
4949

50-
; 0x1C0000 -> 0x1EFFFF 192K Free
50+
; LFB font data
51+
os_font: equ 0x00000000001C0000 ; 0x1C0000 -> 0x1CFFFF 64K Font video data
52+
53+
; 0x1D0000 -> 0x1DFFFF 64K Free
5154

5255
; Misc memory
5356
os_SMP: equ 0x00000000001FF800 ; SMP table. Each item is 8 bytes. (2KiB before the 2MiB mark, Room for 256 entries)

0 commit comments

Comments
 (0)