Line 29... |
Line 29... |
['','singlevalue','symbol']
|
['','singlevalue','symbol']
|
]);
|
]);
|
|
|
# Define the macro functionality.
|
# Define the macro functionality.
|
def emitFunction(ad,fp,argument):
|
def emitFunction(ad,fp,argument):
|
variableName = argument[0]['value'];
|
(addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(argument[0]);
|
(addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(variableName);
|
|
N = ad.Emit_IntegerValue(argument[1]);
|
N = ad.Emit_IntegerValue(argument[1]);
|
offsetString = '%s-1' % argument[1]['value'] if type(argument[0]['value']) == str else '%d-1' % N;
|
offsetString = '%s-1' % argument[1]['value'] if type(argument[0]['value']) == str else '%d-1' % N;
|
ad.EmitPush(fp,addr+N-1,'%s+%s' % (variableName,offsetString));
|
ad.EmitPush(fp,addr+N-1,'%s+%s' % (argument[0]['value'],offsetString));
|
for dummy in range(N-1):
|
for dummy in range(N-1):
|
ad.EmitOpcode(fp,ad.specialInstructions['fetch-'] | ixBank,'fetch- '+bankName);
|
ad.EmitOpcode(fp,ad.specialInstructions['fetch-'] | ixBank,'fetch- '+bankName);
|
ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
|
ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
|
|
|
ad.EmitFunction['.fetchvector'] = emitFunction;
|
ad.EmitFunction['.fetchvector'] = emitFunction;
|