Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Input and Display a number
;nasm 2.13.02 section .data m1 db 'Enter 64 bit number',10d,13d ; 10D is line feed(new line)and 13D(set cursor) is carriage return l1 equ $-m1 m2 db 'The 64 bit number is=',10d,13d l2 equ $-m2 %macro read_write 4 mov rax,%1 ; Function for sys_write mov rdi,%2 ; File descriptor id for i/o mov rsi,%3 ; Memory address of m1 mov rdx,%4 ; count of bytes to be displayed syscall ; call kernel %endmacro section .bss ; block starting symbol for uninitialized var num RESB 10 ; Reserve 10 bytes for num variable section .text global _start _start: read_write 1,1,m1,l1 read_write 0,0,num,16 ; 0 and 0 for read function read_write 1,1,m2,l2 read_write 1,1,num,16 mov rax,60 ; Function no for sys_exit mov rdi,0 ; return 0 syscall
run
|
edit
|
history
|
help
0
Hello
HelloWorldAssem
Exp1
dfsafdsafdsafdsfsd
Positive And Negative Count In Array
count of +ve and -ve nos.
dynstrlen
pushpop
Lec4
Hello world!