Hi, can the experienced programmers confirm if the following statements are true and I understood the topics correct?
The background is that I am working on a tool TIcode99 and would like to get it reading in 99xx(x) source code files correct.
Special operand types [CruBit <cnt>, Xop <xop>, ShiftCount <scnt>]
- If an opcode requires a numeric input for an operand, the sourcecode can define the number as decimal or hexadecimal.
- If an opcode requires a numeric input for an operand, the sourcecode can always define a symbol (EQU opcode) and refer the symbol name instead of a direct numeric input
- If an opcode requires a numeric input for an operand, the sourcecode can refer a Workspace Register instead (like 'SLA R5,R0'). However not the value of the Workspace Register is used but the number of the Workspace Register
- for these operand types I can not use '1+2' as operand.
Immediate operand type <iop>
- If I define a Symbol, I can refer the symbol as immediate operand. Here I can also use a symbol reference like below to define an immediate operand.
-SYMB1 SYMB1+2 SYMB1*256 SYMB1+SYMB2
All of these examples don't work for the operand types CruBit <cnt>, Xop <xop>, ShiftCount <scnt>.
- Below instruction is not supported on the TI-99 Editor Assembler, but probably on the TI-990 Assembler (SDSMAC).
I assume it can be translated to?
Questions about the Immediate Operand type:
1. What does this instruction mean?
CI R0,@ENDDAT ... ENDDAT EQU $
It fails for me in the EA, never the less the 99/8 source code uses such code in DEBUGG.
PAR02 CI R8,@INTEG$*256 ... INTEG$ EQU >AE
2. How can a String be useful as immediate Value?
'E' 'I'-'0' -'0' '--' '-'*256
I don't understand the usecase when to use a String like shown as Immediate operand. How are these "translated" into a numeric value?
Symbol operand type <symbol>
This operand type is a bit unclear to me. Afaik this i used by opcodes DEF, REF, SREF, LOAD, DXOP, END and DFOP.
Should this solely allow the definition/reference of a symbol?
Or should I be able to use something like "SYMB1+2" or other 'expressions'?
Workspace operand type <wa>
XPTL EQU 6 SRL XPTL,8
Since this works, it seems I can use a Symbol instead of a direct reference of one of the Workspace Register. Is it translated to Shift R6 by 8 to the right?
However I can not use "XPTL+2" for that operand.
Expression operand type <exp>
It is quite clear that wherever the syntax definitions says here should be an <exp> as operand type it allows an expression to be used. However it seems that the Immediate operand type <iop> and the General Address operand types <gas>,<gad> are heavily using expressions as well.
Is the assumption correct, that every expression has to result in some number (address) during assembling time?
General operand type <gas>, <gad>
I see sometimes an operand looking like indexed memory addressing, however the @ sign is not there.
WRTADD EQU >402 ... MOVB R4,WRTADD(R9)
Any explanations on why this is missing the @ sign?
Many thanks for your help in advance.