mirror of
https://github.com/chylex/Advent-of-Code.git
synced 2025-07-31 03:59:04 +02:00
Fix access violation in 2015 - Day 1
This commit is contained in:
parent
1bbcccefb4
commit
5e198a7989
@ -1,13 +1,8 @@
|
|||||||
bits 32
|
bits 32
|
||||||
extern _print
|
|
||||||
|
|
||||||
section .data
|
|
||||||
|
|
||||||
print_final_floor: db `Final floor: %d\n`, 0
|
|
||||||
print_first_entered_basement: db `First entered basement: %d\n`, 0
|
|
||||||
|
|
||||||
section .text
|
section .text
|
||||||
|
|
||||||
|
extern _print
|
||||||
global _entryPoint
|
global _entryPoint
|
||||||
|
|
||||||
_entryPoint:
|
_entryPoint:
|
||||||
@ -52,12 +47,21 @@ _entryPoint:
|
|||||||
push eax
|
push eax
|
||||||
push dword print_final_floor
|
push dword print_final_floor
|
||||||
call _print
|
call _print
|
||||||
|
pop eax
|
||||||
|
pop eax
|
||||||
|
|
||||||
push edi
|
push edi
|
||||||
push dword print_first_entered_basement
|
push dword print_first_entered_basement
|
||||||
call _print
|
call _print
|
||||||
|
pop edi
|
||||||
|
pop edi
|
||||||
|
|
||||||
pop edi
|
pop edi
|
||||||
pop ebx
|
pop ebx
|
||||||
leave
|
leave
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
section .data
|
||||||
|
|
||||||
|
print_final_floor: db `Final floor: %d\n`, 0
|
||||||
|
print_first_entered_basement: db `First entered basement: %d\n`, 0
|
||||||
|
Loading…
Reference in New Issue
Block a user