Posted: Thu Dec 29, 2005 5:33 pm Post subject: problem with try exception endtry in Hla
recently i decide to learn assembly language,then i choose The Art of Assembly Language as my textbook.Instead of learning assembly language,i first learn high level assembly language.here is the source code of a very simply program:
program inttest;
#include("stdlib.hhf");
var
i8 : int8;
goodint : boolean;
begin inttest;
repeat
mov(false,goodint);
try
stdout.put("input a number between -128 and 127:");
stdin.geti8();
mov(true,goodint);
mov(al,i;
exception(al.ValueOutOfRange);
stdout.put("error!input again!",nl);
endtry;
until(goodint);
end inttest;
when the hla compiles the source code into .asm form,it says:line 14 syntax error, unexpected '.', expecting coloncolonTkn
that is exception(al.ValueOutOfRange) . i am really confused.i check it for several times,and i found it is excatly the same as the code in the textbook. can anyone help me ? or can any guy give me some advice on learning assembly language? Thanks!
Joined: 14 Jun 2003 Posts: 16777215 Location: Netherlands, Europe
Posted: Sat Jan 07, 2006 12:05 pm Post subject: Re: problem with try exception endtry in Hla
vaticinator wrote:
Code:
exception(al.ValueOutOfRange);
Isn't al a register?
I don't recognize this specific language, but it seems that the al.ValueOutOfRange bit is trying to access a 'member' of a structure al which I guess is incorrect.
After Googling a bit, I'm guessing it should be something like exception(ex.ValueOutOfRange) ?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum