You use db
, which means define byte, single character while you seem to expect an integer in the format, %d
.
You should use dd
instead and remove the quotes:
array dd 1, 2, 3, 4, 5, 6, 7, 8, 9
fmt db "%d", 0
or use %c
if you want to print a char:
array dd "1","2","3","4","5","6","7","8","9"
fmt db "%c", 0
plus, here:
add esp, 4
should be:
add esp, 8
you pushed two arguments.