Created
April 4, 2023 14:56
-
-
Save amostyaev/c1e361a37060e1bb7c1031f1cc8ed6c1 to your computer and use it in GitHub Desktop.
Семинар от 4 апреля
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INCLUDE settings.inc | |
INCLUDE io2020.inc | |
.STACK 4096 | |
.DATA | |
FStr DB 'The program starts working.',0 | |
LStr DB 'The program has ended.',0 | |
TIME STRUC | |
H DB ? | |
M DB ? | |
S DB ? | |
TIME ENDS | |
T TIME <23,59,59> | |
.CODE | |
start: OUTSTR offset FStr | |
NEWLINE | |
; 7.2в | |
; INC T.S | |
; CMP T.S,60 | |
; JB EASY | |
; MOV T.S,0 | |
; INC T.M | |
; CMP T.M,60 | |
; JB EASY | |
; MOV T.M,0 | |
; INC T.H | |
; CMP T.H,24 | |
; JB EASY | |
; MOV T.H,0 | |
; EASY: | |
; MOVZX EAX,T.H | |
; MOVZX EBX,T.M | |
; MOVZX ECX,T.S | |
; OUTU EAX | |
; OUTCHAR ':' | |
; OUTU EBX | |
; OUTCHAR ':' | |
; OUTU ECX | |
; NEWLINE | |
; 8.16 | |
ININT EAX | |
MOV ECX, 32 | |
L: | |
SHL EAX,1 | |
JC PR | |
LOOP L | |
OUTCHAR '0' | |
JMP FIN | |
PR: | |
MOV BL, '0' | |
ADC BL, 0 | |
OUTCHAR BL | |
SHL EAX, 1 | |
LOOP PR | |
FIN: | |
OUTSTR offset LStr | |
NEWLINE | |
EXIT | |
END start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment