📄 z80rules.2
字号:
ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_ne jp c,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp nz,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_ne jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp z,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_eq jp c,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp z,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_eq jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp nz,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and ld a,h or l jp nz,%2 ld hl,%3= ld a,(hl) and #(%1 % 256) jp nz,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and ld a,h or l jp z,%2 ld hl,%3= ld a,(hl) and #(%1 % 256) jp z,%2 ld hl,%3 push hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_or pop de ld a,l ld (de),a= ld a,(hl) or #(%1 % 256) ld (hl),a ld l,a ld h,0 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_or pop de ld a,l ld (de),a= ld a,(hl) or #(%1 % 256) pop de ld (de),a ld l,a ld h,0 push hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and pop de ld a,l ld (de),a.%2= ld a,(hl) and #(%1 % 256) ld (hl),a.%2 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and pop de ld a,l ld (de),a.%2= ld a,(hl) and #(%1 % 256) pop de ld (de),a.%2 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and pop de ld a,l ld (de),a= ld a,(hl) and #(%1 % 256) pop de ld (de),a ld l,a ld h,0 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_xor pop de ld a,l ld (de),a= ld a,(hl) xor #(%1 % 256) pop de ld (de),a ld l,a ld h,0 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and ld a,h or l jp z,%2= ld a,(hl) and #(%1 % 256) jp z,%2 ld l,a ld h,0 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and add hl,hl= ld a,(hl) and #(%1 % 256) ld l,a ld h,0 add hl,hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and push hl ld hl,%2 ;const pop de call l_ne jp c,%3= ld a,(hl) and #(%1 % 256) cp #(%2 % 256) ld hl,1 jp nz,%3 dec hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and push hl ld hl,%2 ;const pop de call l_ne jp nc,%3= ld a,(hl) and #(%1 % 256) cp #(%2 % 256) ld hl,0 jp z,%3 inc hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_or push hl ld hl,%2 ;const pop de call l_ne jp nc,%3= ld a,(hl) or #(%1 % 256) cp #(%2 % 256) ld hl,0 jp z,%3 inc hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_xor push hl ld hl,%2 ;const pop de call l_ne jp nc,%3= ld a,(hl) xor #(%1 % 256) cp #(%2 % 256) ld hl,0 jp z,%3 inc hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_and push hl ld hl,%2 ;const pop de call l_eq jp nc,%3= ld a,(hl) and #(%1 % 256) cp #(%2 % 256) ld hl,0 jp nz,%3 inc hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_or push hl ld hl,%2 ;const pop de call l_eq jp nc,%3= ld a,(hl) or #(%1 % 256) cp #(%2 % 256) ld hl,0 jp nz,%3 inc hl ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_xor push hl ld hl,%2 ;const pop de call l_eq jp nc,%3= ld a,(hl) xor #(%1 % 256) cp #(%2 % 256) ld hl,1 jp nz,%3 dec hl push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a= inc (hl) ld l,(hl) ld h,0 push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a= dec (hl) ld l,(hl) ld h,0 ld hl,1 ;const add hl,sp push hl ld hl,2 ;const add hl,sp= ld hl,1 ;const add hl,sp push hl dec hl ld hl,2 ;const add hl,sp push hl ld hl,3 ;const add hl,sp= ld hl,2 ;const add hl,sp push hl dec hl push hl ld hl,(%1) ld h,0 inc hl ld a,l ld (%1),a dec hl pop de add hl,de= ex de,hl ld hl,%1 ld a,(hl) inc (hl) ld l,a ld h,0 add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a dec hl pop de add hl,de= ld e,(hl) inc (hl) ld d,0 pop hl add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a inc hl pop de add hl,de= ld e,(hl) dec (hl) ld d,0 pop hl add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a pop de add hl,de= inc (hl) ld e,(hl) ld d,0 pop hl add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a pop de add hl,de= dec (hl) ld e,(hl) ld d,0 pop hl add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a dec hl add hl,hl pop de add hl,de= ld e,(hl) inc (hl) ld d,0 ex de,hl add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a inc hl add hl,hl pop de add hl,de= ld e,(hl) dec (hl) ld d,0 ex de,hl add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a add hl,hl pop de add hl,de= inc (hl) ld l,(hl) ld h,0 add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a add hl,hl pop de add hl,de= dec (hl) ld l,(hl) ld h,0 add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a dec hl add hl,hl add hl,hl pop de add hl,de= ld e,(hl) inc (hl) ld d,0 ex de,hl add hl,hl add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a inc hl add hl,hl add hl,hl pop de add hl,de= ld e,(hl) dec (hl) ld d,0 ex de,hl add hl,hl add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 inc hl pop de ld a,l ld (de),a add hl,hl add hl,hl pop de add hl,de= inc (hl) ld l,(hl) ld h,0 add hl,hl add hl,hl pop de add hl,de push hl ld l,(hl) ld h,0 dec hl pop de ld a,l ld (de),a add hl,hl add hl,hl pop de add hl,de= dec (hl) ld l,(hl) ld h,0 add hl,hl add hl,hl pop de add hl,de ld bc,%1 add hl,bc ld bc,%2 add hl,bc= ld bc,%1+(%2) add hl,bc ld l,(hl) ld h,0 pop de ld a,l ld (de),a= ld a,(hl) pop de ld (de),a ld l,a ld h,0 push hl ld hl,%1 ;const pop de call l_pint ld hl,%2= ld (hl),#(%1 % 256) inc hl ld (hl),#(%1 / 256) ld hl,%2 ld hl,2 ;const add hl,sp call l_gint ;%9 push hl ld hl,2 ;const add hl,sp call l_gint ;%9 push hl= pop de pop hl push hl push de push hl push de push hl ld l,(hl) ld h,0 ld bc,%1 add hl,bc pop de ld a,l ld (de),a= ld a,(hl) add a,#(%1 % 256) ld (hl),a ld l,a ld h,0 ld a,(%1 ld l,a ld h,0= ld hl,(%1 ld h,0 ld l,(hl) ld h,0 ld a,h or l jp nz,%1 ld hl,%2= ld a,(hl) and a jp nz,%1 ld hl,%2 ld l,(hl) ld h,0 ld a,h or l jp z,%1 ld hl,%2= ld a,(hl) and a jp z,%1 ld hl,%2 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_ult jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp z,%2 jp nc,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_ule jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jr z,ASMPC+5 jp nc,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_ugt jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jp z,%2 jp c,%2 ld hl,%3 ld l,(hl) ld h,0 push hl ld hl,%1 ;const pop de call l_uge jp nc,%2 ld hl,%3= ld a,(hl) cp #(%1 % 256) jr z,ASMPC+5 jp c,%2 ld hl,%3 ld (%1),hl ld hl,(%1)= ld (%1),hl ld (%1),hl ld (%1+2),de ld hl,(%1) ld de,(%1+2)= ld (%1),hl ld (%1+2),de ld hl,%1 ;const ld de,%2 pop bc push hl call l_int2long_s= ld hl,%1 ;const ld de,%2 pop bc push hl ld hl,%1 ;const ld de,%2 pop de pop bc push hl push de call l_int2long_s= ld hl,%1 ;const pop de pop bc push hl push de ld de,%2 pop de pop bc push hl push de ld hl,2 ;const add hl,sp call l_gint ;%9 pop bc pop bc ret= pop bc pop bc ret call l_gint ;%9 ld hl,0= ld hl,0 call l_glong ld hl,0 ld de,0= ld hl,0 ld d,h ld e,l and #(1 % 256) jp z,%1= rrca jp nc,%1 and #(1 % 256) jp nz,%1= rrca jp c,%1 and #(128 % 256) jp z,%1= rlca jp nc,%1 and #(128 % 256) jp nz,%1= rlca jp c,%1 call htons= ld a,l ld l,h ld h,a ld hl,%1 push hl ld hl,%2 push hl ld hl,%1 push hl= ld hl,%1 push hl ld de,%2 push de push hl ld hl,0 ;const ld de,0= ld hl,0 ;const ld d,h ld e,l ld bc,%1 add hl,bc inc hl= ld bc,%1+1 add hl,bc ld hl,-%1 ;const add hl,sp ld sp,hl ld hl,%2 pop bc push hl= ld hl,-%1+2 ;const add hl,sp ld sp,hl ld hl,%2 push hl ld hl,-%1 ;const add hl,sp ld sp,hl ld hl,%2 pop de pop bc push hl push de= ld hl,-%1+4 ;const add hl,sp ld sp,hl ld hl,%2 push hl push bc call l_gint ;%9 ld a,l ld l,h ld h,a= call l_ghtonsint ld l,a ld h,0 ld a,h or l jp %1 ld hl,%2= and a jp %1 ld hl,%2 ld de,256 call l_mult= ld h,l ld l,0 dec (hl) ld l,(hl) ld h,0 inc hl= dec (hl) ld l,(hl) ld h,0 inc l inc (hl) ld l,(hl) ld h,0 dec hl= inc (hl) ld l,(hl) ld h,0 dec l rst%1:%3defw%2= rst %1 defw %2 push hl ld hl,255 ;const pop de call l_and= ld h,0 dec sp ld hl,%1 ld l,(hl) ld h,0 dec sp ld a,l pop hl ld h,a push hl= ld hl,%1 ld h,(hl) ld l,0 push hl dec sp inc sp= push bc pop bc= ld hl,%1 ;const ld bc,%2 add hl,bc= ld hl,%1+%2 ;const;Special rules for UZI here to optimize..;saves abt 1k on scall1.c alone..= ld hl,(__udata_)= ld hl,udatabase ;const ld hl,(%1) ld h,0 ld a,h or l jp nz,%2 ei.%2= ld a,(%1) and a jr nz,%2 ei.%2 ld hl,%1 ;const call l_gint ;%9= ld hl,(%1) exx ld hl,%1 ;const add hl,sp ld sp,hl exx exx ld hl,%2 ;const add hl,sp ld sp,hl exx= exx ld hl,%1+%2 ;const add hl,sp ld sp,hl exx call l_sub= ex de,hl and a sbc hl,de ld a,(hl) inc hl ld h,(hl) ld l,a push hl ld hl,%1 pop de= ld e,(hl) inc hl ld d,(hl) ld hl,%1 ld a,(hl) inc hl ld h,(hl) ld l,a ld a,h or l= ld a,(hl) inc hl ld h,(hl) ld l,a or h ld hl,%1 ;const ld h,0= ld hl,%1 % 256 ;const ld %1,%2 ld %1,%3= ld %1,%3 ld h,0 pop de ld a,l ld (de),a= pop de ld a,l ld (de),a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -