Sujet : Re: Bliss
De : goathunter (at) *nospam* goatley.com (Hunter Goatley)
Groupes : comp.os.vmsDate : 21. Jul 2024, 09:59:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v7iill$154b$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird Beta
On 7/20/2024 3:04 PM, Arne Vajhøj wrote:
>
arne@arnepc6:~$ blissc-master/blissc newtest.b32
arne@arnepc6:~$ gcc newtest.o -o newtest
arne@arnepc6:~$ ./newtest
Hello world!
arne@arnepc6:~$
Interesting. I copied and pasted your sample program, and I get the same thing I get with all of my tests: it complains about expecting a name, and then it goes into an infinite loop. I can only get past that if I specify some name besides "main" for the main routine.
-----------------------------------------------------
hunter@zaius:bliss$ blissc test.b32
MODULE HELLOWORLD (MAIN=main)=
........................|
%BLISS-W-NAMEEXP, name expected
- at /home/hunter/tmp/bliss/test.b32:1:25
MODULE HELLOWORLD (MAIN=main)=
........................|
%BLISS-W-DELIMEXP, expected delimiter ','
- at /home/hunter/tmp/bliss/test.b32:1:25
MODULE HELLOWORLD (MAIN=main)=
............................|
%BLISS-W-DELIMEXP, expected delimiter '='
- at /home/hunter/tmp/bliss/test.b32:1:29
MODULE HELLOWORLD (MAIN=main)=
............................|
%BLISS-W-NAMEEXP, name expected
- at /home/hunter/tmp/bliss/test.b32:1:29
GLOBAL ROUTINE main =
...............|
%BLISS-W-NAMEEXP, name expected
- at /home/hunter/tmp/bliss/test.b32:4:16
^C
hunter@zaius:bliss$
-----------------------------------------------------
And if I change to "MAIN=test", I get:
hunter@zaius:build$ ./blissc ~/tmp/bliss/test.b32
hunter@zaius:build$ gcc test.o -o test
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x1c): undefined reference to `main'
/usr/bin/ld: (.text+0x20): undefined reference to `main'
/usr/bin/ld: test.o: in function `TEST':
HELLOWORLD:(.text+0xc): undefined reference to `PUTS'
collect2: error: ld returned 1 exit status
hunter@zaius:build$
Also, where is your puts() coming from?
Hunter