📄 asmz80.asm
字号:
call get_opbyte
cmp al,byte ptr [memVal]
lahf
mov byte ptr [_nFlag],1
jmp next
cpl:
not al
or ah,10h
mov byte ptr [_nFlag],1
jmp next
daa:
cmp byte ptr [_nFlag],0
jnz das
sahf
daa
lahf
jmp next
das:
sahf
das
lahf
jmp next
dec_b:
dec bh
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_bc:
dec bx
jmp next
dec_c:
dec bl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_d:
dec ch
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_de:
dec cx
jmp next
dec_e:
dec cl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_h:
dec dh
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_hl:
dec dx
jmp next
dec_l:
dec dl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
dec_xhl:
call get_hl
dec byte ptr [memVal]
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
call put_hl
jmp next
dec_sp:
dec di
jmp next
dec_a:
dec al
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],1
jmp next
di_:
mov byte ptr [_imeFlag],0
jmp next
ei:
cmp byte ptr [_imeFlag],1
jz next
pusha
mov byte ptr [_imeFlag],1
mov word ptr [_intReq],0
popa
jmp execloop2
halt:
cmp byte ptr [_imeFlag],0
jz next
mov byte ptr [_halted],1
dec word ptr [_regPC]
jmp next
inc_bc:
inc bx
jmp next
inc_b:
inc bh
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_c:
inc bl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_de:
inc cx
jmp next
inc_d:
inc ch
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_e:
inc cl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_hl:
inc dx
jmp next
inc_h:
inc dh
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_l:
inc dl
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
inc_sp:
inc di
jmp next
inc_xhl:
call get_hl
inc byte ptr [memVal]
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
call put_hl
jmp next
inc_a:
inc al
push bx
mov bl,ah
lahf
and bl,1
and ah,0feh
or ah,bl
pop bx
mov byte ptr [_nFlag],0
jmp next
jp_nz_word:
call get_opword
sahf
jz next
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
jp_word:
call get_opword
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
jp_z_word:
call get_opword
sahf
jnz next
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
jp_nc_word:
call get_opword
sahf
jc next
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
jp_c_word:
call get_opword
sahf
jnc next
mov si,[memVal]
mov [_regPC],si
mov byte ptr [_endStepOver],1
jmp next
jp_hl:
mov [_regPC],dx
mov byte ptr [_endStepOver],1
jmp next
jr_disp:
call get_opbyte
movsx si,byte ptr [memVal]
add [_regPC],si
sub [clkLeft],5
mov byte ptr [_endStepOver],1
jmp next
jr_nz_disp:
call get_opbyte
sahf
jz next
movsx si,byte ptr [memVal]
add [_regPC],si
sub [clkLeft],5
mov byte ptr [_endStepOver],1
jmp next
jr_z_disp:
call get_opbyte
sahf
jnz next
movsx si,byte ptr [memVal]
add [_regPC],si
sub [clkLeft],5
mov byte ptr [_endStepOver],1
jmp next
jr_nc_disp:
call get_opbyte
sahf
jc next
movsx si,byte ptr [memVal]
add [_regPC],si
sub [clkLeft],5
mov byte ptr [_endStepOver],1
jmp next
jr_c_disp:
call get_opbyte
sahf
jnc next
movsx si,byte ptr [memVal]
add [_regPC],si
sub [clkLeft],5
mov byte ptr [_endStepOver],1
jmp next
ld_bc_word:
call get_opword
mov bx,[memVal]
jmp next
ld_xbc_a:
mov byte ptr [memVal],al
call put_bc
jmp next
ld_b_byte:
call get_opbyte
mov bh,byte ptr [memVal]
jmp next
ld_xword_sp:
call get_opword
mov si,[memVal]
mov [memVal],di
push si
call put_si
shr word ptr [memVal],8
pop si
inc si
call put_si
jmp next
ld_a_xbc:
call get_bc
mov al,byte ptr [memVal]
jmp next
ld_c_byte:
call get_opbyte
mov bl,byte ptr [memVal]
jmp next
ld_de_word:
call get_opword
mov cx,[memVal]
jmp next
ld_xde_a:
mov byte ptr [memVal],al
call put_de
jmp next
ld_d_byte:
call get_opbyte
mov ch,byte ptr [memVal]
jmp next
ld_a_xde:
call get_de
mov al,byte ptr [memVal]
jmp next
ld_e_byte:
call get_opbyte
mov cl,byte ptr [memVal]
jmp next
ld_hl_word:
call get_opword
mov dx,[memVal]
jmp next
ldi_xhl_a:
mov byte ptr [memVal],al
call put_hl
inc dx
jmp next
ld_h_byte:
call get_opbyte
mov dh,byte ptr [memVal]
jmp next
ldi_a_xhl:
call get_hl
mov al,byte ptr [memVal]
inc dx
jmp next
ld_l_byte:
call get_opbyte
mov dl,byte ptr [memVal]
jmp next
ld_sp_word:
call get_opword
mov di,[memVal]
jmp next
ldd_xhl_a:
mov byte ptr [memVal],al
call put_hl
dec dx
jmp next
ld_xhl_byte:
call get_opbyte
call put_hl
jmp next
ldd_a_xhl:
call get_hl
mov al,byte ptr [memVal]
dec dx
jmp next
ld_a_byte:
call get_opbyte
mov al,byte ptr [memVal]
jmp next
ld_b_b:
jmp next
ld_b_c:
mov bh,bl
jmp next
ld_b_d:
mov bh,ch
jmp next
ld_b_e:
mov bh,cl
jmp next
ld_b_h:
mov bh,dh
jmp next
ld_b_l:
mov bh,dl
jmp next
ld_b_xhl:
call get_hl
mov bh,byte ptr [memVal]
jmp next
ld_b_a:
mov bh,al
jmp next
ld_c_b:
mov bl,bh
jmp next
ld_c_c:
jmp next
ld_c_d:
mov bl,ch
jmp next
ld_c_e:
mov bl,cl
jmp next
ld_c_h:
mov bl,dh
jmp next
ld_c_l:
mov bl,dl
jmp next
ld_c_xhl:
call get_hl
mov bl,byte ptr [memVal]
jmp next
ld_c_a:
mov bl,al
jmp next
ld_d_b:
mov ch,bh
jmp next
ld_d_c:
mov ch,bl
jmp next
ld_d_d:
jmp next
ld_d_e:
mov ch,cl
jmp next
ld_d_h:
mov ch,dh
jmp next
ld_d_l:
mov ch,dl
jmp next
ld_d_xhl:
call get_hl
mov ch,byte ptr [memVal]
jmp next
ld_d_a:
mov ch,al
jmp next
ld_e_b:
mov cl,bh
jmp next
ld_e_c:
mov cl,bl
jmp next
ld_e_d:
mov cl,ch
jmp next
ld_e_e:
jmp next
ld_e_h:
mov cl,dh
jmp next
ld_e_l:
mov cl,dl
jmp next
ld_e_xhl:
call get_hl
mov cl,byte ptr [memVal]
jmp next
ld_e_a:
mov cl,al
jmp next
ld_h_b:
mov dh,bh
jmp next
ld_h_c:
mov dh,bl
jmp next
ld_h_d:
mov dh,ch
jmp next
ld_h_e:
mov dh,cl
jmp next
ld_h_h:
jmp next
ld_h_l:
mov dh,dl
jmp next
ld_h_xhl:
call get_hl
mov dh,byte ptr [memVal]
jmp next
ld_h_a:
mov dh,al
jmp next
ld_l_b:
mov dl,bh
jmp next
ld_l_c:
mov dl,bl
jmp next
ld_l_d:
mov dl,ch
jmp next
ld_l_e:
mov dl,cl
jmp next
ld_l_h:
mov dl,dh
jmp next
ld_l_l:
jmp next
ld_l_xhl:
call get_hl
mov dl,byte ptr [memVal]
jmp next
ld_l_a:
mov dl,al
jmp next
ld_xhl_b:
mov byte ptr [memVal],bh
call put_hl
jmp next
ld_xhl_c:
mov byte ptr [memVal],bl
call put_hl
jmp next
ld_xhl_d:
mov byte ptr [memVal],ch
call put_hl
jmp next
ld_xhl_e:
mov byte ptr [memVal],cl
call put_hl
jmp next
ld_xhl_h:
mov byte ptr [memVal],dh
call put_hl
jmp next
ld_xhl_l:
mov byte ptr [memVal],dl
call put_hl
jmp next
ld_xhl_a:
mov byte ptr [memVal],al
call put_hl
jmp next
ld_a_b:
mov al,bh
jmp next
ld_a_c:
mov al,bl
jmp next
ld_a_d:
mov al,ch
jmp next
ld_a_e:
mov al,cl
jmp next
ld_a_h:
mov al,dh
jmp next
ld_a_l:
mov al,dl
jmp next
ld_a_xhl:
call get_hl
mov al,byte ptr [memVal]
jmp next
ld_a_a:
jmp next
ld_xword_a:
call get_opword
mov si,[memVal]
mov byte ptr [memVal],al
call put_si
jmp next
ld_hl_spdisp:
call get_opbyte
movsx dx,byte ptr [memVal]
add dx,di
lahf
and ah,11h
mov byte ptr [_nFlag],0
jmp next
ld_sp_hl:
mov di,dx
jmp next
ld_a_xword:
call get_opword
mov si,[memVal]
call get_si
mov al,byte ptr [memVal]
jmp next
ldh_xbyte_a:
call get_opbyte
movzx si,byte ptr [memVal]
add si,0ff00h
mov byte ptr [memVal],al
call put_si
jmp next
ldh_xc_a:
movzx si,bl
add si,0ff00h
mov byte ptr [memVal],al
call put_si
jmp next
ldh_a_xbyte:
call get_opbyte
movzx si,byte ptr [memVal]
add si,0ff00h
call get_si
mov al,byte ptr [memVal]
jmp next
ldh_a_xc:
movzx si,bl
add si,0ff00h
call get_si
mov al,byte ptr [memVal]
jmp next
or_a_b:
or al,bh
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_c:
or al,bl
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_d:
or al,ch
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_e:
or al,cl
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_h:
or al,dh
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_l:
or al,dl
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_xhl:
call get_hl
or al,byte ptr [memVal]
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_a_a:
or al,al
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
or_byte:
call get_opbyte
or al,byte ptr [memVal]
lahf
and ah,40h
mov byte ptr [_nFlag],0
jmp next
pop_af:
call get_spword
add di,2
mov ah,byte ptr [memVal]
mov al,ah
shr ah,1
shr al,4
and al,1
and ah,070h
or ah,al
mov al,ah
shr al,5
and al,1
; and al,2
; shr al,1
mov byte ptr [_nFlag],al
mov al,byte ptr [memVal+1]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -