@singage

5

updated May 16, 2022 · Assembly
;	Write X86/64 ALP to perform multiplication of two 8-bit hexadecimal numbers. Use successive addition and add and shift method. (Use of 64-bit registers is expected).
; Macro for write
%macro write 2
	mov rax, 1
	mov rdi, 1
	mov rsi, %1
	mov rdx, %2
	syscall
%endmacro

7203_04

May 16, 2022 · Assembly
; Assignment Number : 04
; Problem defination : Write an ALP program to count number of positive and negative number entered by user.


%macro input 2
	mov rax, 0		; System call for read
	mov rdi, 0		; defining stream i.e stdin
	mov rsi, %1	; rsi point to buffer	
	mov rdx, %2	; rdi stores buffer length
	syscall

7203

updated May 16, 2022 · Assembly
; Write a switch case driven X86/64 ALP to perform 64-bit hexadecimal arithmetic operations.

%macro print 2			
	mov rax, 1		 
	mov rdi, 1		    
	mov rsi, %1		    
	mov rdx, %2		   
	syscall		     
%endmacro

count positive and negative elements

updated May 11, 2022 · Assembly
section .data
array dq -1h, 74h, 24h, -45h, 20h
n equ 5

p1_msg db 10,"the no of +ve elements from array"
p1_len equ $-p1_msg


p2_msg db 10,"the no of -ve elements from array"
p2_len equ $-p2_msg

converting decimal to hex

updated May 08, 2022 · Assembly
%macro print 2  
      mov rax, 1
    mov rdi, 1
    mov rsi,%1
    mov rdx, %2
    syscall
%endmacro
 
%macro exit 0 
mov rax, 60

hello program

updated May 08, 2022 · Assembly
section .data
msg1 db "my name is abhijit singh",10 ;10/0ahis for break line 
msg1_len equ $-msg1

msg2 db "i am learning macro in this tutorial"
msg2_len equ $-msg2



%macro print 2   ;print is name and 2 is number of arguments