🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
2 messages
2 total messages Started by Michael Rice Tue, 10 Jul 1990 21:03
Simple MASM Question
#918
Author: Michael Rice
Date: Tue, 10 Jul 1990 21:03
20 lines
991 bytes
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.
Re: Simple MASM Question
#942
Author: D'Arcy J.M. Cain
Date: Thu, 12 Jul 1990 04:46
33 lines
1603 bytes
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                     |
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads