mirror of
https://github.com/chylex/Advent-of-Code.git
synced 2025-05-31 09:34:06 +02:00
Fix access violation in 2015 - Day 1
This commit is contained in:
parent
1bbcccefb4
commit
5e198a7989
@ -1,13 +1,8 @@
|
||||
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
|
||||
|
||||
extern _print
|
||||
global _entryPoint
|
||||
|
||||
_entryPoint:
|
||||
@ -52,12 +47,21 @@ _entryPoint:
|
||||
push eax
|
||||
push dword print_final_floor
|
||||
call _print
|
||||
pop eax
|
||||
pop eax
|
||||
|
||||
push edi
|
||||
push dword print_first_entered_basement
|
||||
call _print
|
||||
pop edi
|
||||
pop edi
|
||||
|
||||
pop edi
|
||||
pop ebx
|
||||
leave
|
||||
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