Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %include "io.inc"
- section .text
- global CMAIN
- CMAIN:
- mov ebp, esp; for correct debugging
- GET_DEC 4, eax
- GET_DEC 4, ebx
- GET_DEC 4, ecx
- mul ebx
- mul ecx
- GET_DEC 4, ebx
- mov ecx, eax; ecx - number of vegetables
- xor edx, edx
- div ebx; eax - number of boxes, edx - in last box
- or edx, 0
- add eax, edx
- GET_DEC 4, ebx; ebx - hrs
- GET_DEC 4, ecx; ecx - mins
- ; -- определяем, меньше ли введенный час, чем 6
- sub ebx, 6
- mov ecx, 1
- shl ecx, 31
- and ebx, ecx
- shr ebx, 31
- ; -- в ebx 1, если введенный час меньше 6 и 0 в противном случае
- xor eax, eax
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement