Without using the stack, eh? Why in the world not??? Well...
lobal main ; [sic]
section .data
number1: db 4
;number1: dd 4
msg1: db "The initialized number is: "
len1: equ $-msg1
enterline: db "", 10, 0
len2: equ $-enterline
section .bss
buf1: resb 4
section .text
main:
; Display "The initialized number is: " message!
mov eax, 4
mov ebx, 1
mov ecx, msg1
mov edx, len1
int 0x80
; Display Initialized number "number1" (HERE IS THE PROBLEM!!!!)
;mov edi, 00000100b
mov eax, 4
mov ebx, 1
add byte [number1], '0'
mov ecx, number1 ; address!
;mov ecx, edi
mov edx, 1
int 0x80
; Diplay "enterline", which is simply an empty line!
mov eax, 4
mov ebx, 1
mov ecx, enterline
mov edx, len2
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
That's only good for a single digit. To do multiple digits, look into the "div" instruction. Dividing repeatedly by ten will isolate the digits you need - still need to add '0' to 'em to make ascii characters, and you get 'em in the wrong order. If you were willing to use the stack, you could "just call printf". PITA without using the stack...
Best,
Frank