/* These macros do the dirty work of the instr decoding, several variables *canbedefinedinthesourcefiletomodifytheworkofthesemacros, *currentlythefollowingvariablesareused: *... *Theregisterusage: *d0-willcontainsourceoperandfordatadirectmode, *otherwisescratchregister *d1-upper16bitarereservedforcaller *lower16bitmaycontainfurtherarguments, *isdestroyedduringdecoding *d2-containsfirsttwoinstructionwords, *firstwordwillbeusedforextensionword *a0-willpointtosource/destoperandforanyindirectmode *otherwisescratchregister *a1-scratchregister *a2-baseaddrtothetaskstructure * *thecurrentimplementationdoesn'tcheckforeverydisallowed *addressingmode(e.g.pcrelativemodesasdestination),aslong *asitonlymeansanewaddressingmode,whichshouldnotappear *inaprogramandthatdoesn'tcrashtheemulation,Ithinkit's *notaproblemtoallowthesemodes.
*/
| first decoding of the instr type
| this separates the conditional instr
.macro fp_decode_cond_instr_type
bfextu %d2{#8,#2},%d0
jmp ([0f:w,%pc,%d0*4])
| extract the addressing mode
| it depends on the instr which of the modes is valid
.macro fp_decode_addr_mode
bfextu %d2{#10,#3},%d0
jmp ([0f:w,%pc,%d0*4])
| get the extension word and test for brief or full extension type
.macro fp_get_test_extword label
fp_get_instr_word %d2,fp_err_ua1
btst #8,%d2
jne \label
.endm
| test if %pc is the base registerfor the indirect addr mode
.macro fp_test_basereg_d16 label
btst #20,%d2
jeq \label
.endm
| test if %pc is the base registerfor one of the extended modes
.macro fp_test_basereg_ext label
btst #19,%d2
jeq \label
.endm
.macro fp_test_suppr_index label
btst #6,%d2
jne \label
.endm
| addressing mode: data register direct
.macro fp_mode_data_direct
fp_decode_addr_reg
printf PDECODE,"d%d",1,%d0
.endm
| get the absolute short address from user space
.macro fp_mode_abs_short
fp_get_instr_word %a0,fp_err_ua1
printf PDECODE,"%x.w",1,%a0
.endm
| get the absolute long address from user space
.macro fp_mode_abs_long
fp_get_instr_long %a0,fp_err_ua1
printf PDECODE,"%x.l",1,%a0
.endm
#endif/* _FP_DECODE_H */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.