Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion laborator/content/stiva/1-max/max.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ main:
mov eax, 1
mov ebx, 4

; TODO: get maximum value. You are only allowed to use one conditional jump and push/pop instructions.
cmp eax, ebx
ja out

push eax
push ebx
pop eax
pop ebx


; TODO: get maximum value. You are only allowed to use one conditional jump and push/pop instructions.
out:
PRINTF32 `Max value is: %d\n\x0`, eax ; print maximum value

ret
5 changes: 4 additions & 1 deletion laborator/content/stiva/2-reverse/reverse-array.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

%define ARRAY_LEN 7

section .data
ection .data
dfadfa


adfa
input dd 122, 184, 199, 242, 263, 845, 911
output times ARRAY_LEN dd 0

Expand Down