Skip to content

Instantly share code, notes, and snippets.

@norbekaiser
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norbekaiser/b2faaf031d09e0cd20fd to your computer and use it in GitHub Desktop.
Save norbekaiser/b2faaf031d09e0cd20fd to your computer and use it in GitHub Desktop.
using a for loop to print 20 times '*'
mov ah, 0x0e
call starline
call newline
mov al,'H'
int 0x10
mov al,'u'
int 0x10
call newline
mov al,'*'
call doit20
infloop:
jmp $
newline:
mov al,0x0a
int 0x10
mov al,0x0d
int 0x10
ret ; returns to where the call was called ( ? det sentence)
starline:
mov al,'*'
call doit20
ret
doit20:
mov bx,0
loop:
cmp bx,20;//itterate it 20 times
je gohome
int 0x10
add bx,1
jmp loop
gohome:
ret
times 510-($-$$) db 0
dw 0xaa55
b4 0e e8 1e 00 e8 12 00 b0 48 cd 10 b0 75 cd 10
e8 07 00 b0 2a e8 11 00 eb fe b0 0a cd 10 b0 0d
cd 10 c3 b0 2a e8 01 00 c3 bb 00 00 83 fb 14 74
07 cd 10 83 c3 01 eb f4 c3 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa
Booting from Hard Disk...
********************
Hu
********************
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment