p.s I read a bit back in the post and sow that you are
using a 32 bit linker.
Thats the main error in your handling the code.
Just use Link or any other 16 bit real mode linker and
your error will not pop up again.
In 32 bit mode (called the protected mode) segment registers are not handled any...
[CODE]
MODEL small
.STACK 64
.DATA
DATA1 DB 52H
DATA2 DB 59H
SUM DB ?
.CODE
MAIN PROC FAR
MOV AL, DATA1
MOV BL, DATA2
ADD AL, BL
MOV SUM, AL
MOV AH, 4CH
INT 21H
MAIN ENDP...
If you use the model small, what is the same as tiny, you can't use segment definitions.
So the code MOV AX,@DATA is wrong, as it assumes that you are using a one segment program.
All the segment registers are set to the same page.
Succes, Tessa
Try just saying .MODEL LARGE then windows will accept it
as being a 16 bit common DOS kind of program.
If you run it, windows see's its a REAL mode program and
will use the DOS INT code's.
You will just get the message: program terminated normaly, since you do nothing more than start en en the...
Dear all,
The stack is growing down, not up.
So if you move sp to bp then push the number the only way to get your data is to subtract.
mov bp,sp
push 54h
.....
mov ax,[bp-2] or mov cx,[bp-2]
afther doing the near call
mov ax,[bp-2] or mov cx,[bp-2]...
The question remains:
- are you building a motherboard
- are you building a processor the be placed on a
motherboard
- if you are not building your own processor, what kind
of processor are you going to use.
Keep in mind that a high frequenty processor ask's for
a very different design...
All of the above are correct.
Indirect addressing, as it says, lets you get the memory
value that is pointed by the given register.
So if EAX = 100
mov ebx,[eax] gets the 100th dword relativ to DS into
EBX.
mov [eax],ebx puts the contents of EBX into the double
word at address...
Your code has no controled end and therefore your program will continue into some old code and crashes.
So you must end it with some code, see your book.
Tessa
The only thing I'm allways curious about is, like lionelhill is asking: what grade did we get.
And denc is just stating what I think about answering
this kind of questions, its fun to find out a simple and
compleet answer.
Tessa
Like any library you can replace the existing object code in it with your own.
But be carefull that your code is errorless.
Assemble the source --> build an object file and
link it into the existing library.
If you don't know how check the manual that come's with your compiler/assembler...
Since a DLL is just a Library, you could extract the object
you wanted to change, write your one, and insert that
in the DLL.
For all those people that ask this question in this forum
I will once tell what DLL stands for.
DLL == Dynamic Link Library,
It can be build by almost anly linker that...
You can put the wait allmost anywere, but be sure that
you let the global interrupt enabled.
That is: use a CLI before you goto the WAI instruction
else it can only be interrupted by the non maskeble
interrupt.
There is something that you have be sure of: the WAI
instruction can only do its...
And for the "oldy's" (I am one myself), a debugger that is not depending on single stepping hardware or debugging
register is often written with the use of self modifing
code.
You can trace a programming by copying the code in a
memory location add a ret to it and just call the memory
location...
Sometimes push and puls in a main routine is used if you
are not sure that the routines you call will save the
registers in use that you want to use again for a next call.
Also it is possible that the routine you are calling expects the values it uses are on the stack.
In some operating...
As I wrote: you can't use three "register" as a index in
one instruction.
So don't correct me with a third index.
An immedicate value can be seen as an index, but normally
it is used as the base address of the array you want
to index within.
Tessa
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.