mirror of
https://github.com/daniel-e/tetros.git
synced 2025-04-18 16:08:22 +02:00
initial release
This commit is contained in:
parent
4a803a407d
commit
f3ca46d5b5
2 changed files with 25 additions and 1 deletions
2
code.asm
2
code.asm
|
@ -6,7 +6,7 @@
|
|||
; ==============================================================================
|
||||
|
||||
%ifdef DEBUG
|
||||
%include "debug_macros.mac"
|
||||
%include "debug_macros.asm"
|
||||
%endif
|
||||
|
||||
; ==============================================================================
|
||||
|
|
24
debug_macros.asm
Normal file
24
debug_macros.asm
Normal file
|
@ -0,0 +1,24 @@
|
|||
%macro print_reg 1
|
||||
mov dx, %1
|
||||
mov cx, 16
|
||||
print_reg_loop:
|
||||
push cx
|
||||
mov al, '0'
|
||||
test dh, 10000000b
|
||||
jz print_reg_do
|
||||
mov al, '1'
|
||||
print_reg_do:
|
||||
mov bx, 0x0006 ; page = 0 (BH), color = gray on black (BL)
|
||||
mov ah, 0x09 ; write character stored in AL
|
||||
mov cx, 1
|
||||
int 0x10
|
||||
mov ah, 3 ; move cursor one column forward
|
||||
int 0x10
|
||||
inc dx
|
||||
mov ah, 2 ; set cursor
|
||||
int 0x10
|
||||
pop cx
|
||||
shl dx, 1
|
||||
loop print_reg_loop
|
||||
jmp $
|
||||
%endmacro
|
Loading…
Add table
Add a link
Reference in a new issue