I've been following along with the book and I have had no problems running the program examples out of the book until now.
This is program 4.1 copied right from the book:
program charInputDemo;
#include( "stdlib.hhf" );
static
c:char;
begin charInputDemo;
stdout.put( "Enter a character: " );
stdin.getc();
if( al >= `a' ) then
if( al <= `z' ) then
and( $5f, al );
endif;
endif;
stdout.put
(
"The character you entered, possibly ", nl,
"converted to upper case, was `"
);
stdout.putc( al );
stdout.put( "`", nl );
end charInputDemo;
I get the following build errors when I try to run Program 4.1
Build :C:\hla\charInputDemo.hla
-C:\hla\charInputDemo.hla
Error in file "C:\hla\charInputDemo.hla" at line 19 [errid:46218/hlaparse.bsn]:
Undefined symbol.
Near: << `a >>
Error in file "C:\hla\charInputDemo.hla" at line 19 [errid:9581/hla.flx]:
Illegal character in file: <'>(39/$27).
Near: << ' >>
Error in file "C:\hla\charInputDemo.hla" at line 23 [errid:46218/hlaparse.bsn]:
Undefined symbol.
Near: << `z >>
Error in file "C:\hla\charInputDemo.hla" at line 23 [errid:9581/hla.flx]:
Illegal character in file: <'>(39/$27).
Near: << ' >>
Return :4
------------------------------------------------------------------------
This is program 4.2 copied from the book:
program charInputDemo;
#include( "stdlib.hhf" );
static
c:char;
begin charInputDemo;
stdout.put( "Enter a character: " );
stdin.getc();
if( al >= `a' ) then
if( al <= `z' ) then
and( $5f, al );
endif;
endif;
stdout.put
(
"The character you entered, possibly ", nl,
"converted to upper case, was `"
);
stdout.putc( al );
stdout.put( "`", nl );
end charInputDemo;
I get similar errors for 4.2:
Build :C:\hla\charInputDemo2.hla
-C:\hla\charInputDemo2.hla
Error in file "C:\hla\charInputDemo2.hla" at line 19 [errid:46218/hlaparse.bsn]:
Undefined symbol.
Near: << `a >>
Error in file "C:\hla\charInputDemo2.hla" at line 19 [errid:9581/hla.flx]:
Illegal character in file: <'>(39/$27).
Near: << ' >>
Error in file "C:\hla\charInputDemo2.hla" at line 23 [errid:46218/hlaparse.bsn]:
Undefined symbol.
Near: << `z >>
Error in file "C:\hla\charInputDemo2.hla" at line 23 [errid:9581/hla.flx]:
Illegal character in file: <'>(39/$27).
Near: << ' >>
Return :4
------------------------------------------------------------------------
----
Hardware:
Gateway P-6831FX Notebook
Core 2 Duo (Centrino Duo) T5450 @ 1.66Ghz
3GB PC800
Software:
Windows Vista Ultimate 64-bit
HLA v1.99
MASM32 v10
HIDEĀ v1.27
Enviroment Variables:
User variables
------------------
TEMP = %USERPROFILE%\AppData\Local\Temp
TMP = %USERPROFILE%\AppData\Local\Temp
System Variables
-----------------------
ComSpec = %SystemRoot%\system32\cmd.exe
DFSTRACINGON = FALSE
FP_NO_HOST_CHECK = NO
hlainc = c:\hla\include
hlalib = c:\hla\hlalib\hlalib.lib
include = c:\hla\include;c:\masm32\include;%include%
lib = ;c:\hla\hlalib
NUMBER_OF_PROCESSORS = 2
OS = Windows_NT
Path = c:\hla;c:\masm32\bin;%path%;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 15 Stepping 13, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 0f0d
TEMP = %SystemRoot%\TEMP
TMP = %SystemRoot%\TEMP
TRACE_FORMAT_SEARCH_PATH = \\NTREL202.ntdev.corp.microsoft.com\34FB5F65-FFEB-4B61-BF0E-A6A76C450FAA\TraceFormat
USERNAME = SYSTEM
windir = %SystemRoot%
Also when I extracted the files for HIDE, I merged them with the hla directory, but I didn't overwrite any files.
Any help appreciated.
Hate to reply to my own thread, but this isn't intended as a bump.
I just tried running the compiler through the cmd prompt and I still get errors.
Here it is:
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>cd\
C:\>hla -v charInputDemo
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.99 build 12920 (prototype)
Win32 COFF output
OBJ output using internal FASM back-end
-test active
HLA Lib Path: c:\hla\hlalib\hlalib.lib
HLA include path: c:\hla\include
HLA temp path:
Linker Lib Path: ;c:\hla\hlalib;c:\hla\hlalib
Files:
1: charInputDemo.hla
Compiling 'charInputDemo.hla' to 'charInputDemo.obj'
using command line:
[hlaparse -level=high -v -sf -ccoff -test "charInputDemo.hla"]
----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.99 build 12919 (prototype)
-t active
File: charInputDemo.hla
Output Path: ""
Language Level: high
Compiling "charInputDemo.hla" to "charInputDemo.obj"
Error in file "charInputDemo.hla" at line 19
Undefined symbol.
Near: << `a >>
Error in file "charInputDemo.hla" at line 19
Illegal character in file: <'>(39/$27).
Near: << ' >>
Error in file "charInputDemo.hla" at line 23
Undefined symbol.
Near: << `z >>
Error in file "charInputDemo.hla" at line 23
Illegal character in file: <'>(39/$27).
Near: << ' >>
Compilation complete, 9000 lines, 0.062 seconds, 145161 lines/second
Using flat assembler version C1.66
4 passes, 1222 bytes.
----------------------
C:\>charInputDemo
'charInputDemo' is not recognized as an internal or external command,
operable program or batch file.
C:\>
:(
I've read ahead since some of the book deals with CPU architecture instead of coding (very interesting stuff for a novice - though a bit over my head), but I'm stuck otherwise.
Ugh... I feel stupid...
I should have typed it out manually instead of copying and pasting.
There is a big difference between " ` " and " ' ".
I only noticed just now.
... Sorry. Disregard.