Code: Select all
E9 FD 83
Code: Select all
E9 00 7C
Code: Select all
E9 FD 83
Code: Select all
E9 00 7C
It is related to operating system development because its on about the processor.iansjack wrote:And, when reading it, bear in mind that the jump is relative not absolute.
This is not a question about Operating System Development.
This is not jmp short 0x00 this is jmp word 0x0000. You cannot jump to the address 0x0000 with a short jump because a short jump must be within -128 to +127.computertrick wrote:I have looked at the opcodes of a short jump to 0x00 with org set to 0x7c00 and the opcodes I get are
I can understand if it saidCode: Select all
E9 FD 83
But where the hell does the FD and 83 come from? Can anyone explain this and prehap's suggest a good reference for opcodes of 8086 please? I have looked around and I am having trouble with understanding short jumps.Code: Select all
E9 00 7C
Your right sorry I meant a near jump don't know why I put short jump. I see what you mean now.Prochamber wrote:This is not jmp short 0x00 this is jmp word 0x0000. You cannot jump to the address 0x0000 with a short jump because a short jump must be within -128 to +127.computertrick wrote:I have looked at the opcodes of a short jump to 0x00 with org set to 0x7c00 and the opcodes I get are
I can understand if it saidCode: Select all
E9 FD 83
But where the hell does the FD and 83 come from? Can anyone explain this and prehap's suggest a good reference for opcodes of 8086 please? I have looked around and I am having trouble with understanding short jumps.Code: Select all
E9 00 7C
Let's analyze this command:
E9 FD 83
The first byte E9 or 1110 1001 means 'jmp near'
You can look this up 16-bit encodings in Appendix D of The Art of Assembly.
Chapter 6 is also a good reference for instructions just remember the examples code with be for MASM not NASM.
The next two bytes are the offset. This is relative not absolute. There are in 'little endian', i.e. least significant first, so they actually mean 0x83FD. The base offset is 0x7C00 and a near jump takes three bytes, therefore a base of 0x7C03. If you add 0x83FD you wrap right around back to zero.
If you are using NASM as your compiler you can use the 'ndisasm' command to disassemble your programs. Set the ORG point with '-o 0x7C00'.
All computer programs, operating systems or not, run on a processor. If you are struggling to understand how to program the computer system you are using when such information is readily available from the manufacturer, I'd suggest putting off your operating system development for a while.computertrick wrote:It is related to operating system development because its on about the processor.iansjack wrote:And, when reading it, bear in mind that the jump is relative not absolute.
This is not a question about Operating System Development.
No point putting it off for a while that's giving up... Where would people get if they just gave up on things.Gigasoft wrote:All computer programs, operating systems or not, run on a processor. If you are struggling to understand how to program the computer system you are using when such information is readily available from the manufacturer, I'd suggest putting off your operating system development for a while.computertrick wrote:It is related to operating system development because its on about the processor.iansjack wrote:And, when reading it, bear in mind that the jump is relative not absolute.
This is not a question about Operating System Development.
Well that's uncalled for... Didn't realise when you ask a question on these forum's big heads respond this way.Griwes wrote:No point carrying on when you lack the basic knowledge and ability to read manuals.