Вопрос

Using TASM, I have successfully programmed a digital stopwatch (LAP and normal) on emu8086 but when I try to run it on TASM i get the error Forward reference needs override. I know why this error occurs as I have two procedures both including a call of the other procedure so putting one of the procedure before the other one won't work. For example

proc1 proc
;some code
CALL proc2
;some code
ret
endp

proc2 proc
;some code
CALL proc1
;some code
ret
endp

Another solution would be defining/writing the whole procedure instead of calling it but that gives an error of Relative jump out of range. (My code has several jumps too)

My Question is that is there anyway I can remove the forward reference needs override error in my situation?

Это было полезно?

Решение

Some other sources seem to suggest that TASM has a multi-pass command line option /m2, which will do the specified number of passes over the source. Two passes should be sufficient in your case, as the first pass will see the definition of proc2 and the second pass can then use it to correctly translate the earlier call proc2.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top