hangs on fedora every time program is compiled
Asked by
Souvik Maji
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?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- gnusim8085 Edit question
- Assignee:
- Onkar Shinde Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Souvik Maji for more information if necessary.
To post a message you must log in.