Skip to content

Commit fd3a2c2

Browse files
committed
Trying to do something
1 parent cd75192 commit fd3a2c2

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
File renamed without changes.

bootloader/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extern int _low_print();
2+
void entry_point() {
3+
int status = _low_print();
4+
}

bootloader/main_low.asm

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
%include "constants.asm"
2+
;;%include "io.asm___
3+
"
4+
%macro print_string 4
5+
; Args: (str, len, x, y)
6+
; check es, bx
7+
mov ax, 0x1301 ; (print string, update cursor)
8+
mov bp, %1 ; (es:bp string pointer)
9+
mov cx, %2 ; (string length)
10+
mov dx, 0x%4%3 ; (pos_y, pos_x)
11+
int 0x10
12+
%endmacro
13+
14+
%macro print_string_ext 7
15+
; Args: (str, len, x, y, fg_color, bg_color, page)
16+
; check es
17+
mov bx, 0x%7%6%5 ; (pagenumber, attribute)
18+
print_string %1, %2, %3, %4
19+
%endmacro
20+
21+
global _low_print
22+
[SECTION .text]
23+
24+
_low_print:
25+
push rbp
26+
mov rbp, rsp
27+
print_string_ext bl_welcome, bl_welcome_len, 02, 02, C_BLACK, C_WHITE, 0
28+
mov rax, 15
29+
leave
30+
ret
31+
32+
[SECTION .data]
33+
bl_welcome db "TESTTT"
34+
bl_welcome_len equ ($-bl_welcome)

0 commit comments

Comments
 (0)