I am trying to make a program that prompts the user for input then outputs it to them(back to the good old days :D). It all works, except it doesn't output what the user inputs, it outputs a bunch of crazy numbers, can someone help me?
Btw I am using NASM.
Test Run:
Please enter something(max 255 chars): tom
You entered: 7
[section .data]
choice: db ""
fmt1: db "%s",10,0
output: db "Please enter something(max 255 chars): ",0
output2: db "You entered: %s",0
[section .text]
global _main
extern _printf, _scanf
_main:
push output
call _printf
add esp, 4
push choice
push fmt1
call _scanf
add esp, 8
push dword[choice]
push output2
call _printf
add esp, 8
mov eax, 0
ret