Line 39... |
Line 39... |
#<alu_dst> := <register> | DO
|
#<alu_dst> := <register> | DO
|
#<alu_op> := add|adc|sub|sbb| and|orl|not|xrl| rla|rra|rlca|rrca| aaa|
|
#<alu_op> := add|adc|sub|sbb| and|orl|not|xrl| rla|rra|rlca|rrca| aaa|
|
# t1|rst|daa|cpc|sec|psw
|
# t1|rst|daa|cpc|sec|psw
|
#<flag list> := <flag> [, <flag> ...]
|
#<flag list> := <flag> [, <flag> ...]
|
#<flag> := #decode|#di|#ei|#io|#auxcy|#clrt1|#halt|#end|#ret|#rd|#wr|#setacy
|
#<flag> := #decode|#di|#ei|#io|#auxcy|#clrt1|#halt|#end|#ret|#rd|#wr|#setacy
|
# #ld_al|#ld_addr|#fp_c|#fp_r|#fp_rc (*2)
|
# #ld_al|#ld_addr|#fp_c|#fp_r|#fp_rc|#clr_cy_ac (*2)
|
#
|
#
|
# *1 Labels appear alone by themselves in a line
|
# *1 Labels appear alone by themselves in a line
|
# *2 There are some restrictions on the flags that can be used together
|
# *2 There are some restrictions on the flags that can be used together
|
# *3 Registers are specified by IR field
|
# *3 Registers are specified by IR field
|
#
|
#
|
Line 91... |
Line 91... |
# #ld_al : Load AL register with register bank output as read by operation 1.
|
# #ld_al : Load AL register with register bank output as read by operation 1.
|
# (used in memory and io access).
|
# (used in memory and io access).
|
# #ld_addr : Load address register (H byte = register bank output as read by
|
# #ld_addr : Load address register (H byte = register bank output as read by
|
# operation 1, L byte = AL).
|
# operation 1, L byte = AL).
|
# Activate vma signal for 1st cycle.
|
# Activate vma signal for 1st cycle.
|
|
# #clr_acy : Instruction clears CY and AC flags. Use with #fp_rc.
|
# --- PSW update flags: use only one of these
|
# --- PSW update flags: use only one of these
|
# #fp_r : This instruction updates all PSW flags except for C.
|
# #fp_r : This instruction updates all PSW flags except for C.
|
# #fp_c : This instruction updates only the C flag in the PSW.
|
# #fp_c : This instruction updates only the C flag in the PSW.
|
# #fp_rc : This instruction updates all the flags in the PSW.
|
# #fp_rc : This instruction updates all the flags in the PSW.
|
################################################################################
|
################################################################################
|
Line 564... |
Line 565... |
substr($uinst->{field1},22,2) = '10';
|
substr($uinst->{field1},22,2) = '10';
|
}
|
}
|
if($uinst->{flags} =~ /#fp_rc/){
|
if($uinst->{flags} =~ /#fp_rc/){
|
substr($uinst->{field1},22,2) = '11';
|
substr($uinst->{field1},22,2) = '11';
|
}
|
}
|
|
if($uinst->{flags} =~ /#clr_acy/){
|
|
substr($uinst->{field1},17,1) = '1';
|
|
}
|
|
|
}
|
}
|
|
|
sub process_flags {
|
sub process_flags {
|
|
|
Line 659... |
Line 662... |
$uinst->{flags} = $uinst->{flags}." #fp_r";
|
$uinst->{flags} = $uinst->{flags}." #fp_r";
|
}
|
}
|
if($flag_str =~ /#fp_rc/){
|
if($flag_str =~ /#fp_rc/){
|
$uinst->{flags} = $uinst->{flags}." #fp_rc";
|
$uinst->{flags} = $uinst->{flags}." #fp_rc";
|
}
|
}
|
|
if($flag_str =~ /#clr_acy/){
|
|
$uinst->{flags} = $uinst->{flags}." #clr_acy";
|
|
}
|
|
|
if($error ne ''){
|
if($error ne ''){
|
$num_errors++;
|
$num_errors++;
|
$uinst->{error} = $error;
|
$uinst->{error} = $error;
|
};
|
};
|