aboutsummaryrefslogtreecommitdiffstats
path: root/boot/printb.asm
blob: a8fa788efa013af9cb488e89588f35ec2188639c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
org 0x0500


SECTION .data
boot: db 'Welcome to the second stage!', 0x0A, 0x0D, 0x00
foo: db 'What a nice message this is!', 0x0A, 0x0D, 0x00

SECTION .text


jmp start

print:
	push ax
	cld
	mov ah, 0x0E

	.loop:
	lodsb
	cmp al, 0x00
	je .out
	int 0x10
	jmp .loop
	.out:
	pop ax
	ret

start:
	mov si, boot
	call print

	mov si, foo
	call print

; maybe to something here...
; e.g.: how to keep CPU from spinning at 100%