Delta Tau Forums

Full Version: passing arguments to subroutines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am converting Turbo PMAC code to Power PMAC code and have a problem with subroutines. I have the following code:

N98000: // M98 ---
DWELL 0; //disable blending through m-codes
read(X,Y,Z);
if (Q100 & $800000)DT_XData = d24;
if (Q100 & $1000000)DT_YData = d25;
if (Q100 & $2000000)DT_ZData = d26;
DT_MCode = 98;
while(DT_MCode > 0.0)
dwell 50;
close

When I try and use it Q100 indicates no arguments were passed.
Power PMAC is slightly different than Turbo PMAC. We now use D0 to indicate the past arguments.

N98000: // M98 ---
DWELL 0; //disable blending through m-codes
read(X,Y,Z);
if (D0 & $800000)DT_XData = d24;
if (D0 & $1000000)DT_YData = d25;
if (D0 & $2000000)DT_ZData = d26;
DT_MCode = 98;
while(DT_MCode > 0.0)
dwell 50;
close