🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2800

Converting TP5 INline func to TC++

#2800
From: Ajai Sehgal
Date: Wed, 24 Oct 1990 15:18
21 lines
1249 bytes
Does anyone know how to code the equivalent of the TP "inline" function in
TC++ ? The inline function puts machine code directly into the compiled
source. I know I can use the "_emit_" function to put single byte machine
instructions in, and I can also use variables but in TP the variable is used
slightly differently, ie:

	"The value of a variable is the offset address of the variable
	 within its base segment. The base segment of a global var is the
	 data segment which is accessible through the DS register."

My variable is PPT = array[0..255,0..2] of byte; and the inline statement
I'm trying to translate looks like this:

	inline($1E/$C5/$76/<PPT/$C8........);   

The "<" means that only the least significant byte of the value is coded.

Any help would be greatly appreciated.

Ajai.
Technical Details
Message-ID: <ajai.656781514@talos.sce.carleton.ca>
Path: arc1-ca.pugleaf.net!utzoo!dciem!nrcaer!cunews!talos.sce.carleton.ca!ajai

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!dciem!nrcaer!cunews!talos.sce.carleton.ca!ajai
From: ajai@sce.carleton.ca (Ajai Sehgal)
Newsgroups: comp.os.msdos.programmer
Subject: Converting TP5 INline func to TC++
Summary: How does on convert the TP inline function to TC++
Message-ID: <ajai.656781514@talos.sce.carleton.ca>
Date: 24 Oct 90 15:18:34 GMT
Sender: news@ccs.carleton.ca (news)
Organization: Carleton University, Ottawa, Canada
Lines: 21