DGivney / assemblytutorials

This project was put together to teach myself NASM x86 assembly language on linux.
https://asmtutor.com/
654 stars 117 forks source link

Lesson 7 64 bit issue #19

Closed CedricFauth closed 4 years ago

CedricFauth commented 5 years ago

Hi, I tried to compile lesson 7 in 64 bit. Everything seems to work except for one issue. The problem is that the sprintlf 'function' does not print a line feed. It seems to make the same as 'sprint'.

I did something like this (used 64 bit registers instead of the 32 bit sub registers):

sprintLF: call sprint push rax
mov rax, 0Ah,0Ah
push rax
mov rax,rsp
call sprint
pop rax
pop rax
ret