Thursday, January 13, 2022

Simple program using Assembly language.

Include irvine32.inc
;AddTwo.asm-adds two 32-bit integer.
;chapter3 example
.386
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
val1 byte 7
val2 sword -12
val3 dword 1000h
warray word 12,56,78
str1 byte 5 DUP("HOMEWORK"),0
qarray qword 8 Dup(?)
.code
main proc
mov al,val1
mov bx,val2
mov eax,val3
mov ah,str1
call writestring
mov  RBX,qarray
  invoke ExitProcess,0
  main endp
  end main

No comments:

Post a Comment