Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > bce60cf52a6a00051bea43bc15d960be > files > 16

gnusim8085-1.3.6-1.fc14.i686.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