it returns back within the pascal program
cause its a global variable..but is there a method to have this code loaded to an address?
kinda like an inline in gfa
or a declared array const a:arry[0..xx] of word=(xxxxxxxxxx);
but using the pascal {$L XXX.o}
i know im vague because i have never seen an example anywhere doing this before ,
nor have i any prior knoWLAGE..
enjoy
Code: Select all
program pascal_global_asm_var;
(* ****************************
use pascal variables globally
in asm linked routines , easy ,
but is there a better way ???
and additionally :
how can i use outside of a procedure?
***************************** *)
uses system;
{$X+}
var
reh:word;
procedure timer;external;
{$L E:\global1.o}
begin
timer;
timer;
timer;
timer;
timer;
timer;
timer;
writeln(reh);
end.
{*****and the asmto link devpac
write as dri object .O!!*****}
{
xRef reh
XDEF TIMER
SECTION TEXT
TIMER: ADDQ.W #1,reh
rts
}
charles feb 2012