How the multiple definition is implemented in assembly give example of it
8086
Multiple Definitions
You can have multiple data definition statements in a program. For example:
prompt DB “Enter n “,10, 0
choice DB ‘y’ ;ASCII code of y
value1 DW 12345
volue2 DD 12345679
The assembler allocates contiguous memory for multiple variable definitions.
MIPS
Multiple Definitions
.data
inputNum: .asciiz "Enter a number between 2 to 50: "
oneDouble: .double 1.0
minusOneDouble: .double -1.0
N: .word 12345
M: byte 0
array: .space 200
newline: .asciiz "\n"
Comments
Leave a comment