Author Topic: HexIO  (Read 4376 times)

JaguarFR

  • Guest
HexIO
« on: March 24, 2013, 04:32:51 PM »
May the evolution of machine code flourish on the latest machine

Hello, I'm new here. This is my open forum post. I'd thought to start with where I am at Program 3.14 in Randall Hyde's AoA.

line, "stdin.getd();" is giving an error where an expected ':' where '(' is.

I changed the line to "stdin.getd:;" but then it compiles fine, yet when I run the program, HexIO, I don't have the ability to enter an input.

The whole program is to learn about input/output using stdout.putb, stdout.putw, stdout.putd, stdin.getb, stdin.getw, or stdin.getd.

I expect to find out a way of using stdin.getd so that I can input data. I'm gonna try writing the following program,
"program getd;

i32: int32;

getd;

stdin.getd();
mov( eax, i32 );
stdout.putd( i32 );

end getd;"

Thanks for reading!

May the evolution of machine code flourish on the latest machine

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: HexIO
« Reply #1 on: March 25, 2013, 07:16:59 PM »
welcome to the forum   :t

never tried HLA (so, that's what it looks like)   :P
most of us use vanilla Masm or GoAsm syntax
but, there are a few that are familiar with Randy's HLA

anyways, thought i'd reply and let you know why you didn't have a faster response

Antonius

  • Regular Member
  • *
  • Posts: 1
Re: HexIO
« Reply #2 on: November 06, 2014, 12:16:01 PM »
I know this is an old post, but seeing as I've come across it, know the answer, and it hasn't been answered is impetus for me to respond. In fact, there is no stdin.getd(). If you go into your HLA include directory, which is most likely C:\hla\include, and open stdin.hhf in notepad.exe then you'll see there's no getd. However, there is geth8, geth16, and geth32 which correspond to getb, getw, and getd respectively. Interestingly enough, the stdout namespace seems to have putb, putw, and putd.

Gunther

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: HexIO
« Reply #3 on: November 07, 2014, 05:19:48 AM »
Antonius,

I know this is an old post, but seeing as I've come across it, know the answer, and it hasn't been answered is impetus for me to respond. In fact, there is no stdin.getd(). If you go into your HLA include directory, which is most likely C:\hla\include, and open stdin.hhf in notepad.exe then you'll see there's no getd. However, there is geth8, geth16, and geth32 which correspond to getb, getw, and getd respectively. Interestingly enough, the stdout namespace seems to have putb, putw, and putd.

your answer is okay. Better late than never. And welcome to the forum.

Gunther
Get your facts first, and then you can distort them.