Chapter 2 A Couple Problems

From: Newbie (me_at_home.goaway)
Date: 10/14/03


Date: Tue, 14 Oct 2003 03:32:12 GMT

Hello Mr. Hyde

 I finished chapter two 0ct. 10, then got real busy this week end hope you
have time to reply just a few bugs I came accross and I was un able to
debug first Numbers In columns in Chapter two the first one did not
compile, but the second one did. here is my verbose output.
HLA (High Level Assembler)

Released to the public domain by Randall Hyde.

Version Version 1.56 build 8240 (prototype)

Win32 COFF output

Using MASM assembler

MASM output

Files:

1: nic.hla

Compiling 'nic.hla' to 'nic.asm'

using command line [hlaparse -v -sm "nic.hla"]

HLA (High Level Assembler) Parser

Released to the public domain by Randall Hyde.

Version Version 1.56 build 8239 (prototype)

File: nic.hla

Output Path: ""

Compiling "nic.hla" to "nic.asm"

Error in file "nic.hla" at line 40 [errid:7791/hla.flx]:

Illegal character in file: <">(34/$22).

Near: << " >>

Error in file "nic.hla" at line 40 [errid:98808/hlaparse.c]:

syntax error, unexpected ')'.

Near: << ) >>

Compilation complete, 5002 lines, 0.222 seconds, 22532 lines/second

Now here is your code from 2.10 Numbers in columns
program NumsInColumns;

 

 

#include( "stdlib.hhf" );

 

 

var

 

    i32: int32;

 

    ColCnt: int8;

 

begin NumsInColumns;

 

 

    mov( 96, i32 );

 

    mov( 0, ColCnt );

 

    while( i32 > 0 ) do

 

 

        if( ColCnt = 8 ) then

 

 

            stdout.newln();

 

            mov( 0, ColCnt );

 

 

        endif;

 

      stdout.puti32Size( i32, 5, ` ` ); // 2.10 I am Lost here

        sub( 1, i32 );

 

        add( 1, ColCnt );

 

 

    endwhile;

 

    stdout.newln();

 

 

end NumsInColumns;

I Noted were I was lost...

Now this was my second Problem Capter 2.10.7 CharInPut

HLA (High Level Assembler)

Released to the public domain by Randall Hyde.

Version Version 1.56 build 8240 (prototype)

Win32 COFF output

Using MASM assembler

MASM output

Files:

1: cip.hla

Compiling 'cip.hla' to 'cip.asm'

using command line [hlaparse -v -sm "cip.hla"]

HLA (High Level Assembler) Parser

Released to the public domain by Randall Hyde.

Version Version 1.56 build 8239 (prototype)

File: cip.hla

Output Path: ""

Compiling "cip.hla" to "cip.asm"

Error in file "cip.hla" at line 63 [errid:7791/hla.flx]:

Illegal character in file: <`>(96/$60).

Near: << ` >>

Error in file "cip.hla" at line 63 [errid:42806/hlaparse.bsn]:

Undefined symbol.

Near: << n >>

Error in file "cip.hla" at line 63 [errid:7791/hla.flx]:

Illegal character in file: <'>(39/$27).

Near: << ' >>

Error in file "cip.hla" at line 63 [errid:80034/hlaparse.bsn]:

Illegal constant type.

Near: << ) >>

Error in file "cip.hla" at line 65 [errid:7791/hla.flx]:

Illegal character in file: <`>(96/$60).

Near: << ` >>

Error in file "cip.hla" at line 65 [errid:42806/hlaparse.bsn]:

Undefined symbol.

Near: << y >>

Error in file "cip.hla" at line 65 [errid:7791/hla.flx]:

Illegal character in file: <'>(39/$27).

Near: << ' >>

Error in file "cip.hla" at line 65 [errid:80034/hlaparse.bsn]:

Illegal constant type.

Near: << ) >>

Error in file "cip.hla" at line 77 [errid:7791/hla.flx]:

Illegal character in file: <`>(96/$60).

Near: << ` >>

Error in file "cip.hla" at line 77 [errid:42806/hlaparse.bsn]:

Undefined symbol.

Near: << n >>

Error in file "cip.hla" at line 77 [errid:7791/hla.flx]:

Illegal character in file: <'>(39/$27).

Near: << ' >>

Error in file "cip.hla" at line 77 [errid:80034/hlaparse.bsn]:

Illegal constant type.

Near: << ) >>

Compilation complete, 7790 lines, 0.672 seconds, 11592 lines/second

And here is your code from the html

program charInput;

 //this one is in 2.10.7 stumped me as well

 

#include( "stdlib.hhf" );

 

 

var

 

    counter: int32;

 

 

begin charInput;

 

        

 

    // The following repeats as long as the user

 

    // confirms the repetition.

 

    

 

    repeat

 

    

 

        // Print out 14 values.

 

        

 

        mov( 14, counter );

 

        while( counter > 0 ) do

 

        

 

            stdout.put( counter:3 );

 

            sub( 1, counter );

 

            

 

        endwhile;

 

        

 

        // Wait until the user enters `y' or `n'.

 

        

 

        stdout.put( nl, nl, "Do you wish to see it again? (y/n):" );

 

        forever

 

        

 

            stdin.readLn();

 

            stdin.getc();

 

            breakif( al = `n' );

 

            breakif( al = `y' );

 

            stdout.put( "Error, please enter only `y' or `n': " );

 

            

 

        endfor;

 

        stdout.newln();

 

        

 

    until( al = `n' );

 

            

 

end charInput;

Whew.. I hope this provides the info you need to help me, I also debugged
my enviroment variables and user variables. Things are working good.
The linux setup should work seemless on Mac OSX jaguar I will try to set up this
week if you agree.

PS. I am pleased to taught by you thank you again