Skip to content

Commit

Permalink
asm: add puts() macro to display strings
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Oct 28, 2020
1 parent 812b6d1 commit ccdb3fb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/arch/x86/asm-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
outb %al, %dx;
.endm

.macro puts addr len
movw (com_ports), %dx
mov $\addr, %si
mov $\len, %cx

cld
rep outsb
.endm

.macro SAVE_REGS
push %_ASM_AX
push %_ASM_BX
Expand Down

0 comments on commit ccdb3fb

Please sign in to comment.