;m4 macros that emulate z80 instructions for asm80
;Willard Goosey
;goosey@sdc.org
;7/10/2011

;$Id: z80mac.def,v 1.4 2011/09/05 21:31:45 goosey Exp goosey $


;based on macros from:
;8080/Z80 Assembly Language
;Techniques for Improved Programming
;Alan R. Miller, 1981
;page 75-76

;NEG does a 2s-complment of A

define(`neg',`;do NEG in 8080
	cma ;1s complement
	inr a ;2s complement
	')
      
;SLA  shift left arithmatic
;destroys A
define(`sla',`;do SLA in 8080 -- destroys A
	mov a,$1 ;load arg into A
	add a    ;a=a+a
	mov $1,a ;store a into arg
	')
     
     

;;;end z80mac.h

      

