mrice@caen.engin.umich.edu (Michael Rice) (07/11/90)
Programming in MASM 5.1 I at times write code that requires JMP instructions that go over 128 bytes. Not knowing all the directives and syntax (since I am a bit new at this) I don't know the best way to jump farther than 128 bytes(+ or -). I have been doing something like this: je far_jump_link . . . far_jump_link: jmp far_jump . . . far_jump: This doesn't look like good programming to me. What is the REAL way to do this. Any help appreciated.
darcy@druid.uucp (D'Arcy J.M. Cain) (07/12/90)
In article <1990Jul10.210329.2214@caen.engin.umich.edu> mrice@caen.engin.umich.edu (Michael Rice) writes: >Programming in MASM 5.1 I at times write code that requires JMP >instructions that go over 128 bytes. Not knowing all the directives >and syntax (since I am a bit new at this) I don't know the best way to >jump farther than 128 bytes(+ or -). I have been doing something like this: > >je far_jump_link >. >far_jump_link: >jmp far_jump >. >far_jump: > >This doesn't look like good programming to me. What is the REAL way to >do this. Any help appreciated. Doesn't seem so bad but I usually do it as follows: jne dont_jump_far jmp far_jump dont_jump_far: [...] far_jump: The only reason for the difference is that the [...] code doesn't have to jump over the "jmp far_jump" command eventually. You know, a milli-second here, a nano-second there. Pretty soon you're talking about real time. :-) -- D'Arcy J.M. Cain (darcy@druid) | Government: D'Arcy Cain Consulting | Organized crime with an attitude West Hill, Ontario, Canada | (416) 281-6094 |