NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: maplesirop on April 16, 2013, 03:33:17 AM
-
Add X
MAR <- X
MBR <- M[MAR]
AC <- MBR
I read that this is direct addressing, but we are passing the value X into MAR, which is used as an index to the memory.
AddI X
MAR <- X
MBR <- M[MAR]
MAR <- MBR
MBR <- M[MAR]
AC <- AC + MBR
In this case the address (or index) is used to contain the address that contains the value.
-
I'm not sure I understand your notation, Maplesirop. "<" implies a "mov", not "less than", right? And I'll bet "MBR" doesn't mean "Master Boot Record", either...
Are you trying to do something like...
string1 db "hello world", 0
string2 db "goodbye world", 0
stringptr dd string1
...
...
; if command is "quit"
mov dword [stringptr], string2
Or... ?
Best,
Frank
-
Thanks for replying,
MBR = memory buffer address
<- direction of data