• Please review our updated Terms and Rules here

8086 machine code

scommstech

Experienced Member
Joined
Jul 16, 2007
Messages
69
Hi
Does anybody know a site that has 8086 machine code info.
I’m trying to machine code an Eprom and have lost my
training notes.
I need to make a jump back 53d bytes. If I remember right you
add one to the jump from location, count the bytes back to the
jump to location, convert to hex, then find the reciprocal.
This then becomes the displacement in a “direct within
segment expression”. For a jump back 53d I make it EBAC.
Can anyone confirm this.
Regards
Scommstech.
 
For relative jumps,
jp next
next:
is 7Ah 00h
and
back:
jp back
is 7Ah FEh

nop is 90h, if 3 bytes to patch.

Juha
 
For relative jumps,
jp next
next:
is 7Ah 00h
and
back:
jp back
is 7Ah FEh

nop is 90h, if 3 bytes to patch.

Juha

Juha
Thanks for the reply.
I'm still a bit lost as 7AH seems to be jump on parity, and
7AFEH appears to be jump back 1 byte not 53 bytes.
Maybe I'm reading this wrong.
Regards
Scommstech
 
Sorry. EBh aka JMP, like you said initially.

Same relative offset calculation however, count from the
byte after the offset byte. EBh 00h would continue like nothing happened,
EBh FEh would get stuck (_two_ bytes backward, back to the JMP),
and -53d would be 256 - 53 = 203 or EBh CBh.

Juha
 
If you've got a windows (or DOS!) machine nearby, you can test all this code/opcode stuff out just by shelling out to DOS and typing Debug at the command prompt.

Type A to assemble some code, then U to disassemble it, and you'll see all the opcodes right next to the instructions you assembled.
 
Offsets

Offsets

Sorry. EBh aka JMP, like you said initially.

Same relative offset calculation however, count from the
byte after the offset byte. EBh 00h would continue like nothing happened,
EBh FEh would get stuck (_two_ bytes backward, back to the JMP),
and -53d would be 256 - 53 = 203 or EBh CBh.

Juha

Juha
Many thanks, your explanation did the trick. It's about 20 years
since I messed with machine code and couldn't remember
the offset calculation. Thanks again.

Thanks also to hargle.
regards
Scommstech
 
looks like you got it taken care of, good info junki. i was going to suggest you talk to Trixter if you hadn't gotten it figured out yet.
 
looks like you got it taken care of, good info junki. i was going to suggest you talk to Trixter if you hadn't gotten it figured out yet.

Mike who is trixter. I have the offset sorted, my memory write
prog now runs with WE, RAs, CAS being generated. The address
is incrementing but I'm not getting my 01s pattern out of the 8088. The op
is stuck on 1s. If I can't work out what is wrong I may be coming back for
help.
Regards
Scommstech.
 
Trixter is the user name of a regular here on this site. i don't know if you've ever seen the 8088 corruption software in action, but he is the guy who wrote that program. he is excellent with x86 asm.
 
Back
Top