Hello everyone,
I am still having some issues with Cromemco's Macro assembler. For some reason I cannot get programs to work right with the ORG statement.
If ORG 100H is at the top of the code it is fine, but if I put ORG 100H not at the top, it starts executing at whatever is first. I am also putting the main routines name with the END statement but that isn't helping.
MYPROG:
... some code
END MYPROG
Does the main routine have to be named something special?
I thought the assembler/linker would put a jump instruction at
the beginning of the code to jump to the 'main' routine. Is this
true?
If someone has some advice or could help me understand this better I would appreciate it.
Thanks--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/72e5238e-bf12-46e3-beb9-eae89db2d072%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/7b97be27-2337-4481-8e81-f813ded6666bn%40googlegroups.com.
Thank you for the replies.
I have read through the assembler manual and reread the END,ENTRY and I am not seeing where it explicitly states the rules for this.
I know older manuals make you read between the lines versus
stating crucial information to an obvious manner.
The only thing that works for me is putting ORG 100H at the top with a jump instruction next to point to the main routine.
Adding END MAIN (label to main routine) does not seem to produce the effect that it is supposed to. adding ENTRY MAIN above the main routine does not seem to effect anything either.
An example of what is confusing me. From the TUART manual, page
24 "initialization subroutine". Maybe I shouldn't be trying to
assemble this as a stand alone program but it looks like it should
work. The example starts with line 36 - ORG 1000H. line 107 has
ORG 100H (where the entry point should be). The program does not
use the END statement. The linker complains about invalid jump
addresses and overlaying data.
Link to manual:
My machine does not like this code. ORG 1000H is the biggest problem. If I replace that with ORG 100H and JP to line 109 ( I labeled it START, commented out the original org 100h)), the program runs.
Thanks for the help. I feel ignorant and I appreciate the
enlightenment.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CAC5emFGsr7LsU6uNB5p%3DTFNHqWSJ8Zmsshk-phAyV%3DQCZ5SGRQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/1fb1e01f-862b-4f93-a318-54bc4bebf5f8%40gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CAEJwZW3DiDu4tfCh8SNP9iSAy8XyxxCgWdPg7wLQnqb%3Dnfu%2Bug%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CAEJwZW3DiDu4tfCh8SNP9iSAy8XyxxCgWdPg7wLQnqb%3Dnfu%2Bug%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CANV55Ov81LDoTDcje4gJcXY87ddQEq9cxCBLd-SL8%3DUQsCZF2A%40mail.gmail.com.
>> My machine does not like this code. ORG 1000H is the biggest problem. If I replace that with ORG 100H
>> and JP to line 109 ( I labeled it START, commented out the original org 100h)), the program runs.
I'm looking at my TUART manual right now. I think that the initialization code shown is just meant to be a subroutine to be included in a program that uses the TUART. The ORG 1000H is just used to put this little snippet of code somewhere out of the way of the main program that will probably be ORGed at 100H.
As far as the END syntax, that sounds like an assembler problem or bug. I always use a cross assembler to generate Z80 code and then download the .HEX file for "LOAD" and run. That way you wouldn't have to put up with ancient applications that might have problems.
Roger
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CANV55Ov81LDoTDcje4gJcXY87ddQEq9cxCBLd-SL8%3DUQsCZF2A%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CAC5emFHzaLJhj-K1ngdj2HCv0LLsWHXFWVrP55kdUXsEEGw9QA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cromemco/CANV55Ov8nFofkP2s0PRfW6YaSbUEWHSwkZAqP9JQH6rS%2BpcXqA%40mail.gmail.com.