[Coco] 6x09/hello_os9-Commented

Alex Evans varmfskii at gmail.com
Sun Oct 1 22:41:53 EDT 2023


Line 1: Yes always 0 for origin in OS-9, not that a line starting with an *
is actually a comment
Line 4/5: size is the data size for the program.
Line 5: mod gets lots of explanation - engpgm (module size), $11 (module
type/language $10=program module, $01=6x09 object code), $81
(attributes/revision, $80=sharable, $01=revision 1), size (data size)
line 6: fcs is a string constant with the last character having the high
bit set.
line 8, pcr is to indicate the address is calculated program counter
relative
line 9: y is the maximum number of characters for WritLn to write.
line 13: the b register contains the return value (error code) of the
program. 0=no error.
line 16: yes the section is not executed as it is data not code
line 17: fcc is a pseudo op for a string constant
line 18: fcb is a pseudo ope for byte constants
line 19: * is the current address, so the expression gives the number of
bytes from the label hello to the current position
line 21: since the program starts at 0, the current address at this point
is the length of the module.

On Sun, Oct 1, 2023 at 9:04 PM coco--- via Coco <coco at maltedmedia.com>
wrote:

> All
>
> I received a "Hello World" sample program From Alex Evans, It works
> well.
> I have looked at it line by line trying to understand everything.
> I still have some questions, so I have posted the code followed by a
> table
> with line numbers, code and comments/questions. This shows exactly what
> I
> understand or am guessing and what I am clueless about. Please take a
> look at
> it and using line numbers you can comment on the accuracy of my
> understanding
> of the code and the meaning of the lines of code I am clueless about.
>
> The location of the post is:
>      http://jechar.ca/coco/Download/source/6x09/hello_os9-Commented.html
>
> Thanks
> Charlie
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list