Browse Source

Changed text editor to reflect new screen

master
Stephen D 1 year ago
parent
commit
5633638ae8
2 changed files with 16 additions and 4 deletions
  1. +11
    -0
      drivers/screen.asm
  2. +5
    -4
      textedit.asm

+ 11
- 0
drivers/screen.asm View File

@@ -8,6 +8,17 @@ kernel_scn_cls:
xor di, di ;set to 0
mov cx, (640*480)/2
rep stosw

;; set cursor pos to 0,0
push dx
push bx
mov dx, 0
mov ah, 0x02
mov bx, 0 ;tmp
int 0x10
pop bx
pop dx
pop es
pop ax
pop cx


+ 5
- 4
textedit.asm View File

@@ -2,14 +2,14 @@
sedit_init:
pusha

mov cx, 0xFF
mov bx, SEDIT_INIT_MSG ;Init msg
call print

mov [SEDIT_EDITOR_BUFFER], byte 0

;; set the video mode, clearing the screen
mov ax, 0x03
int 0x10
;; clear the screen
call kernel_scn_cls
;; read in from disk
mov dh, 0
@@ -18,6 +18,7 @@ sedit_init:
mov bx, SEDIT_EDITOR_BUFFER
call read_sector

mov cx, 0xFF
;; print it out
call print

@@ -54,7 +55,7 @@ sedit_loop:
mov bx, SEDIT_EDITOR_BUFFER
add bx, [SEDIT_CURSOR_POSITION]
mov [bx], al ;Append character to text buffer
mov bx, 0xFF
call print_char ;pretty temporary

;; Increment cursor position


Loading…
Cancel
Save