LATEX
https://docs.google.com/file/d/0BxZLLe3YK34xclJJWHdTNG40ZlE/edit?usp=sharing
ASSIGNMENT 5
https://docs.google.com/file/d/0BxZLLe3YK34xclJJWHdTNG40ZlE/edit?usp=sharing
ASSIGNMENT 5
;RollNo-2412
;Name: Kshitish Deo
;Assignment No. 5
;PROGRAM:
SECTION .data
msg1: db "Hello World",0xA
len1: equ $-msg1
SECTION .bss
a resq 20
result resq 20
SECTION .text
global _start
_start:
%macro print 1
mov rax,1
mov rdi,1
mov rsi,%1
mov rdx,len1
syscall
%endmacro
mov rcx,msg1 ;immediate addressing mode
print rcx
mov rdi,0
mov rdi,msg1 ;register addressing mode
mov rcx,rdi
print rcx
mov rax,60
mov rdi,0
syscall
;OUTPUT:
; [mrunmayi@localhost ~]$ nasm -f elf64 loa64.asm
;[mrunmayi@localhost ~]$ ld –o loa64 loa64.o
;[mrunmayi@localhost ~]$ ./loa
;Hello World
;Hello World
;[mrunmayi@localhost ~]$
CREDITS--Kshitish Deo
No comments:
Post a Comment