📄 asmz80.asm
字号:
jmp next
pop_bc:
call get_spword
add di,2
mov bx,[memVal]
jmp next
pop_de:
call get_spword
add di,2
mov cx,[memVal]
jmp next
pop_hl:
call get_spword
add di,2
mov dx,[memVal]
jmp next
push_bc:
mov [memVal],bx
sub di,2
call put_spword
jmp next
push_de:
mov [memVal],cx
sub di,2
call put_spword
jmp next
push_hl:
mov [memVal],dx
sub di,2
call put_spword
jmp next
push_af:
push ax
mov byte ptr [memVal+1],al
mov al,ah
shl ah,1
and ah,0a0h
shl al,4
and al,10h
or ah,al
mov al,byte ptr [_nFlag]
shl al,6
or ah,al
mov byte ptr [memVal],ah
pop ax
sub di,2
call put_spword
jmp next
res_0_b:
btr bx,8
jmp next
res_0_c:
btr bx,0
jmp next
res_0_d:
btr cx,8
jmp next
res_0_e:
btr cx,0
jmp next
res_0_h:
btr dx,8
jmp next
res_0_l:
btr dx,0
jmp next
res_0_xhl:
call get_hl
btr [memVal],0
call put_hl
jmp next
res_0_a:
btr ax,0
jmp next
res_1_b:
btr bx,9
jmp next
res_1_c:
btr bx,1
jmp next
res_1_d:
btr cx,9
jmp next
res_1_e:
btr cx,1
jmp next
res_1_h:
btr dx,9
jmp next
res_1_l:
btr dx,1
jmp next
res_1_xhl:
call get_hl
btr [memVal],1
call put_hl
jmp next
res_1_a:
btr ax,1
jmp next
res_2_b:
btr bx,10
jmp next
res_2_c:
btr bx,2
jmp next
res_2_d:
btr cx,10
jmp next
res_2_e:
btr cx,2
jmp next
res_2_h:
btr dx,10
jmp next
res_2_l:
btr dx,2
jmp next
res_2_xhl:
call get_hl
btr [memVal],2
call put_hl
jmp next
res_2_a:
btr ax,2
jmp next
res_3_b:
btr bx,11
jmp next
res_3_c:
btr bx,3
jmp next
res_3_d:
btr cx,11
jmp next
res_3_e:
btr cx,3
jmp next
res_3_h:
btr dx,11
jmp next
res_3_l:
btr dx,3
jmp next
res_3_xhl:
call get_hl
btr [memVal],3
call put_hl
jmp next
res_3_a:
btr ax,3
jmp next
res_4_b:
btr bx,12
jmp next
res_4_c:
btr bx,4
jmp next
res_4_d:
btr cx,12
jmp next
res_4_e:
btr cx,4
jmp next
res_4_h:
btr dx,12
jmp next
res_4_l:
btr dx,4
jmp next
res_4_xhl:
call get_hl
btr [memVal],4
call put_hl
jmp next
res_4_a:
btr ax,4
jmp next
res_5_b:
btr bx,13
jmp next
res_5_c:
btr bx,5
jmp next
res_5_d:
btr cx,13
jmp next
res_5_e:
btr cx,5
jmp next
res_5_h:
btr dx,13
jmp next
res_5_l:
btr dx,5
jmp next
res_5_xhl:
call get_hl
btr [memVal],5
call put_hl
jmp next
res_5_a:
btr ax,5
jmp next
res_6_b:
btr bx,14
jmp next
res_6_c:
btr bx,6
jmp next
res_6_d:
btr cx,14
jmp next
res_6_e:
btr cx,6
jmp next
res_6_h:
btr dx,14
jmp next
res_6_l:
btr dx,6
jmp next
res_6_xhl:
call get_hl
btr [memVal],6
call put_hl
jmp next
res_6_a:
btr ax,6
jmp next
res_7_b:
btr bx,15
jmp next
res_7_c:
btr bx,7
jmp next
res_7_d:
btr cx,15
jmp next
res_7_e:
btr cx,7
jmp next
res_7_h:
btr dx,15
jmp next
res_7_l:
btr dx,7
jmp next
res_7_xhl:
call get_hl
btr [memVal],7
call put_hl
jmp next
res_7_a:
btr ax,7
jmp next
ret:
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
ret_nz:
sahf
jz next
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
jmp next
ret_z:
sahf
jnz next
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
jmp next
ret_nc:
sahf
jc next
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
jmp next
ret_c:
sahf
jnc next
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
jmp next
reti:
call get_spword
add di,2
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_imeFlag],1
mov byte ptr [_endStepOver],1
jmp next
rla:
sahf
rcl al,1
lahf
and ah,1
mov byte ptr [_nFlag],0
jmp next
rra:
sahf
rcr al,1
lahf
and ah,1
mov byte ptr [_nFlag],0
jmp next
rlca:
rol al,1
lahf
and ah,1
mov byte ptr [_nFlag],0
jmp next
rrca:
ror al,1
lahf
and ah,1
mov byte ptr [_nFlag],0
jmp next
rl_b:
sahf
rcl bh,1
pushf
cmp bh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_c:
sahf
rcl bl,1
pushf
cmp bl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_d:
sahf
rcl ch,1
pushf
cmp ch,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_e:
sahf
rcl cl,1
pushf
cmp cl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_h:
sahf
rcl dh,1
pushf
cmp dh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_l:
sahf
rcl dl,1
pushf
cmp dl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rl_xhl:
call get_hl
sahf
rcl byte ptr [memVal],1
pushf
cmp byte ptr [memVal],0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
call put_hl
jmp next
rl_a:
sahf
rcl al,1
pushf
cmp al,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_b:
sahf
rcr bh,1
pushf
cmp bh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_c:
sahf
rcr bl,1
pushf
cmp bl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_d:
sahf
rcr ch,1
pushf
cmp ch,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_e:
sahf
rcr cl,1
pushf
cmp cl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_h:
sahf
rcr dh,1
pushf
cmp dh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_l:
sahf
rcr dl,1
pushf
cmp dl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rr_xhl:
call get_hl
sahf
rcr byte ptr [memVal],1
pushf
cmp byte ptr [memVal],0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
call put_hl
jmp next
rr_a:
sahf
rcr al,1
pushf
cmp al,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_b:
rol bh,1
pushf
cmp bh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_c:
rol bl,1
pushf
cmp bl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_d:
rol ch,1
pushf
cmp ch,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_e:
rol cl,1
pushf
cmp cl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_h:
rol dh,1
pushf
cmp dh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_l:
rol dl,1
pushf
cmp dl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rlc_xhl:
call get_hl
rol byte ptr [memVal],1
pushf
cmp byte ptr [memVal],0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
call put_hl
jmp next
rlc_a:
rol al,1
pushf
cmp al,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_b:
ror bh,1
pushf
cmp bh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_c:
ror bl,1
pushf
cmp bl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_d:
ror ch,1
pushf
cmp ch,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_e:
ror cl,1
pushf
cmp cl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_h:
ror dh,1
pushf
cmp dh,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_l:
ror dl,1
pushf
cmp dl,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rrc_xhl:
call get_hl
ror byte ptr [memVal],1
pushf
cmp byte ptr [memVal],0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
call put_hl
jmp next
rrc_a:
ror al,1
pushf
cmp al,0
lahf
and ah,40h
popf
adc ah,0
mov byte ptr [_nFlag],0
jmp next
rst_00:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],0
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_08:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],8
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_10:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],10h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_18:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],18h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_20:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],20h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_28:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],28h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_30:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],30h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
rst_38:
mov si,[_regPC]
mov [memVal],si
sub di,2
call put_spword
mov word ptr [_regPC],38h
mov byte ptr [_endStepOver],1
mov byte ptr [_ignoreStack],0
jmp next
sbc_a_b:
sahf
sbb al,bh
lahf
mov byte ptr [_nFlag],1
jmp next
sbc_a_c:
sahf
sbb al,bl
lahf
mov byte ptr [_nFlag],1
jmp next
sbc_a_d:
sahf
sbb al,ch
lahf
mov byte ptr [_nFlag],1
jmp next
sbc_a_e:
sahf
sbb al,cl
lahf
mov byte ptr [_nFlag],1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -