← Back to team overview

gnusim8085-devel team mailing list archive

[Question #263382]: hangs on fedora every time program is compiled

 

New question #263382 on gnusim8085:
https://answers.launchpad.net/gnusim8085/+question/263382

I wanted to compile the following program  which computes the factorial of a number stored in 2000h and stores the result in 2001h:
;MAIN
LXI SP,2999H
LXI H,2000H
MOV B,M
CALL FACT
INR L
MOV M,B
RST 1
;FACTORIAL
FACT: MOV A,B
LOOP: DCR A
CPI 01
RZ
CALL MUL
JMP LOOP
RET
;MULTIPLICATION
MUL: MOV C,A
LOOP1: ADD B
DCR C
JNZ LOOP1
MOV B,A
RET 
;END

I changed the content of memory address 2000h to 5. If i try only asssemble program, it is assembled correctly, but if execute assembled and loaded program gnusim8085 hangs. Every time with no exception. Is this  a bug or I have written something terribly wrong?

-- 
You received this question notification because you are a member of
GNUSim8085 developers, which is an answer contact for gnusim8085.