Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Loops-Do-while/X86-Assembly/loops-do-while.x86
Normal file
25
Task/Loops-Do-while/X86-Assembly/loops-do-while.x86
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
extern _printf
|
||||
|
||||
section .data
|
||||
output db 0,0
|
||||
|
||||
section .text
|
||||
global _main
|
||||
_main:
|
||||
mov bl, 0
|
||||
looping:
|
||||
add bl, 0x31 ;0x30 to 0x39 is 0 to 9 in ASCII
|
||||
mov [output], bl
|
||||
sub bl, 0x30
|
||||
push output
|
||||
call _printf
|
||||
add esp, 4
|
||||
xor eax, eax
|
||||
xor edx, edx
|
||||
mov al, bl
|
||||
mov ecx, 6
|
||||
div ecx ; remainder is saved in edx
|
||||
cmp edx, 0
|
||||
jne looping ; if n & 6 != 0 do looping again
|
||||
xor eax, eax
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue