Skip to content

Instantly share code, notes, and snippets.

@febnug
Created November 18, 2021 10:21
Show Gist options
  • Save febnug/5f68c090b0be256b80a2fd31efd98866 to your computer and use it in GitHub Desktop.
Save febnug/5f68c090b0be256b80a2fd31efd98866 to your computer and use it in GitHub Desktop.
org 100h
mov cx, 5
push cx
mov ah, 0eh
_loop:
mov al, "*"
int 10h
dec cx
test cx, cx
jz _enter
jnz _loop
_this_is_the_end:
pop cx
dec cx
push cx
_loop2:
mov ah, 0eh
mov al, " "
int 10h
cmp cx, 3
jne _lompat
dec cx
jmp _loop2
_lompat:
cmp cx, 2
je _tambah
jmp _loop
_tambah:
mov bx, cx
inc cx
jmp _loop
_enter:
mov ah, 0eh
mov al, 10
int 10h
mov al, 13
int 10h
cmp bx, 2
je _cheat
cmp bx, 1
je _cheat2
jmp _this_is_the_end
_cheat2:
pop cx
add cx, 2
jmp _loop3
_cheat:
pop cx
push cx
_loop3:
jcxz _pop
mov ah, 0eh
mov al, " "
int 10h
loop _loop3
_pop:
pop cx
dec cx
push cx
_star:
mov ah, 0eh
mov al, "*"
int 10h
cmp cx, 2
dec cx
test cx, cx
je _dec_bx
cmp cx, 0FFFEh
je _exit
jne _star
_dec_bx:
dec bx
jmp _enter
_exit:
mov ax, 4c00h
int 21h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment