Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 2f135adb622bf35d9dcdc8d9daa299b8 > files > 12

gnusim8085-1.3.5-1mdv2009.1.i586.rpm

;See docs/asm-guide.txt before
;continuing

;Just debug this
;erroneos program ;-)

;A sample program
;illustrating debuging facilities
;"step-in", "step-over", "step-out"

;To see asm listing choose
;Assembler=>ShowListing menu

	jmp	start

;data
hai:	db	34,56
tmp:	equ	39h

;code
start:	mov	a,h
	;push	b
	
;Try hitting any of 3 debugging buttons
;for understanding its mechanism
;Try setting breakpoints and hitting
;the "execute" button. (There are 2
;breakpoints set automatically when this
;file is opened!)

	call	func1	;call func1
	
	pop	b

	mov	a,h
	call	func2	;call func2
	call 	func3	;call func3
	mov	m,a
	

	hlt

func1:	nop
	nop
	nop
	mvi	c,56
	ret

func2:	nop
	nop
	mvi	b,45h
	nop
	ret

func3:	nop
	push	b
	nop
;@ (automatic break point)
	mvi	d,34h
	call 	func2
	nop
;@
	pop	b
	
	ret