🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #942

Re: Simple MASM Question

#942
From: 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                     |
Technical Details
Message-ID: <1990Jul12.044654.28425@druid.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!druid!darcy
References: <1990Jul10.210329.2214@caen.engin.umich.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!druid!darcy
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: Simple MASM Question
Message-ID: <1990Jul12.044654.28425@druid.uucp>
Date: 12 Jul 90 04:46:54 GMT
References: <1990Jul10.210329.2214@caen.engin.umich.edu>
Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain)
Organization: D'Arcy Cain Consulting, West Hill, Ontario
Lines: 33