First Upload
This commit is contained in:
20
2/test.asm
Normal file
20
2/test.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
mov bh, 0
|
||||
mov ah, cl
|
||||
begin:
|
||||
cmp ch, ah ; if ah > ch jump to lower
|
||||
jg lower
|
||||
mov al, ah
|
||||
mov ah, ch
|
||||
mov ch, al
|
||||
lower:
|
||||
cmp bh, ch ; if ch < bh jump to finish
|
||||
jg finish
|
||||
mov bh, ch
|
||||
finish:
|
||||
mov ch, dl
|
||||
mov dl, dh
|
||||
mov dh, 0
|
||||
cmp ch, 0
|
||||
je the_end ; if ch == 0 jump to the_end
|
||||
jmp begin
|
||||
the_end:
|
||||
Reference in New Issue
Block a user