[Coco] is this a bug?

Gene Heskett gheskett at shentel.net
Wed Apr 19 21:50:02 EDT 2017


On Wednesday 19 April 2017 20:55:31 Dave Philipsen wrote:

> Is this a bug with the OS9 assembler?  It appears that the first pass
> interprets the "jmp" as direct addressing while the second pass
> interprets it as extended which causes a phasing error.  Am I missing
> something?
>
> If I force it with "jmp    >entry" it works.
>
> Dave
>
>
>
> Microware OS-9 Assembler RS Version 01.00.00    04/19/2017 19:43:30
> Page 001
>   -
>
> 00001
> 00002
> 00003                            opt   M
> 00004
> 00005   2000                     org   $2000
> 00006 W 2000 7E2006     start    jmp   entry
> 00007   2003 54455354            fcc   /TEST/
> ***** Error: phasing
> 00008 E 2007 12         entry    nop
> 00009                            end
>
> 00001 error(s)
> 00001 warning(s)
> $0008 00008 program bytes generated
> $0000 00000 data bytes allocated
> $0086 00134 bytes used for symbols

This might be a coding error Dave, but its been a while for my old wet 
ram so don't quote me.  What happens if you replace the
 
 entry 	nop   with
 entry 	rtn   hex $39 ?

or the jmp with an lbra

OTOH, you set an origin, which is not normally used in an os9 header 
unless its zeroed because os-9 defaults to position independent code 
(PIC) output.  And the jmp isn't PIC proper IIRC as its wants an 
absolute address.  bra/lbra and friends are PIC acceptable. 

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


More information about the Coco mailing list