Strona 1 z 1

[SOLVED] Błędy bibliotek w Asemblerze

: 21 mar 2011, 19:02
autor: Zorian1
Witam dopiero co zaczynam moją przygodę z Asemblerem lecz nie mogę się uporać z kompilatorem :pt36:
Program wygląda następująco:

Kod: Zaznacz cały

program dodawanie
#include( "stdlib.hhf" )

static :
	a: int8	:=-8
	b: int16	:=-16
	c: int32	:=-32

begin dodwanie
stdout.put
(
   nl,
   "poczatkowe wartosci" : a=", a,
   ", b=", b,
   ", c=", c,
   nl
);

mov ( 0, al );    //Przeniesiene 0 do pamięci
sub ( a, al );    //Odejmowanie od zeraz zmiennej a do pamięci al
mov ( al, a );    //Pzypisanie wyniku do pamięci a

mov ( 0, ax );    
sub ( b, ax );    
mov ( ax, b ); 

mov ( 0, eax );    
sub ( c, eax );    
mov ( eax, c );

//Wyświetlenie wartości
stdout.put
(
   nl,
   "Po odejmowaniu" : a=", a,
   ", b=", b,
   ", c=", c,
   nl
);

end dodawanie
A po komendzie hla -v nazwa Kompilator wywala mi następujący błąd

Kod: Zaznacz cały

HLA (High Level Assembler)
Use '-license' to see licensing information.
Version 2.15 build 4354 (prototype)
ELF output
OBJ output using HLA Back Engine
-test active

HLA Lib Path:     /home/zorian/asembler/hla/hlalib/hlalib.a
HLA include path: /home/zorian/asembler/hla/include
HLA temp path:    
Files:
1: Odejmowanie.hla

Compiling 'Odejmowanie.hla' to 'Odejmowanie.o'
using command line:
[hlaparse -LINUX -level=high  -v -test "Odejmowanie.hla"]

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version 2.15 build 4354 (prototype)
-test active
File: Odejmowanie.hla
Output Path: ""
hlainc Path: "/home/zorian/asembler/hla/include"
hlaauxinc Path: ""
Compiler generating code for Linux OS
Back-end assembler: HLABE
Language Level: high

Assembling "Odejmowanie.hla" to "Odejmowanie.o"
Error in file "Odejmowanie.hla" at line 4 [errid:129196/hlaparse.c]:
syntax error, unexpected ':'.
Near: << : >>

Error in file "hla.hhf" at line 800 [errid:10058/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
Illegal character in file: <">(34/$22).
Near: << " >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
stdout.put: Unknown data type 
(a is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
stdout.put: Unknown data type 
(b is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
stdout.put: Unknown data type 
(c is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 17
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

Error in file "hla.hhf" at line 800 [errid:10058/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
Illegal character in file: <">(34/$22).
Near: << " >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
stdout.put: Unknown data type 
(a is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
stdout.put: Unknown data type 
(b is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

Error in file "hla.hhf" at line 660 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
This output type is not supported.
Near: << ) >>

Error in file "hla.hhf" at line 836 [errid:2984/hla.flx]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
stdout.put: Unknown data type 
(c is type "").
Near: << ) >>

Error in file "hla.hhf" at line 795 [errid:4237/hlaparse.bsn]:
Macro called in file "stdout.hhf" at line 794
Macro called in file "Odejmowanie.hla" at line 39
Expected ':', encountered '('
(Possible undefined ID).
Near: << ( >>

HLAPARSE assembly failed with 21 errors

Szukałem rozwiązania lecz kompletnie nic nie ma. Z góry dziękuję za pomoc

Re: Błędy bibliotek w Asemblerze

: 21 mar 2011, 21:53
autor: Hauleth
Do assemblera nie ma kompilatorów są tylko assemblery. Używaj jakiejś ludzkiej składni (czyt. Intel'a) i NASM'a lub FASM'a.

Re: Błędy bibliotek w Asemblerze

: 22 mar 2011, 15:25
autor: Zorian1
Dzięki za pomoc :)