Questions tagged [hla]

High Level Assembly Language (HLA) is an educational language created by Randall Hyde and documented in his book Art of Assembly.

High Level Assembly Language (HLA) is a procedural language that compiles to x86 machine code developed by Randall Hyde to help students learn Assembly language. HLA incorporates high level programming language constructs including multi-dimensional arrays, ENUMs, bounds checking, functions, and a standard library. This "High Level" C-like code can be mixed with a subset of x86 Assembler inline.

To purchase Art of Assembly, find it on the No Starch Press

73 questions
0
votes
1 answer

Converting C to HLA

I am having some trouble converting this C code into HLA, I was wondering if someone could help me out. The purpose of my code is to repetitively prompt for a decimal value from the user. And in the end the program should read out the total of all…
user5500712
0
votes
1 answer

Does shr(7,dest) take more time than shr(1,dest)?

I am in the process learning HLA Assembly from the book, Art of Assembly Language, 2nd Edition. I just started learning about the shr and shl instructions and i would like to know if shifting by a larger amount would take more time than shifting by…
Fence_rider
  • 163
  • 1
  • 14
0
votes
1 answer

How do I access the 6th element of the dynamic array?

program test_idea; #include( "stdlib.hhf" ); static begin test_idea; mov(6, ecx); malloc(ecx); mov(30, ecx); mov(ecx, [eax + 5]); mem.free(eax); end test_idea; not sure why this does not work. I am using hla and assembly.
0
votes
3 answers

How to properly divide numbers in HLA assembly

I got Integer overflow in HLA nasm. I would like to write simple program that divide provided Distance variable by 15000 and display evaluation of it, but I faced that problem. I simply don't understand an idea of division in HLA. Thank you in…
RMachnik
  • 3,598
  • 1
  • 34
  • 51
0
votes
2 answers

What does shl( 5, ax ) do?

I'm using HLA, and don't understand this instruction: shl( 5, ax ) I'd like detail on what this instruction is doing.
user2961169
  • 55
  • 2
  • 4
0
votes
1 answer

HLA - Printing out variables with stdout.put

I'm starting to learn assembly and I'm using the Art of Assembly Language book. I'm having problems trying to run an example in the book. This is the program here: program DemoVars; #include( "stdlib.hhf" ); static InitDemo: int32 := 5; …
tenkii
  • 449
  • 2
  • 10
  • 23
0
votes
1 answer

HLA High Level Assembly Continuous Loop

The problem wants to loop through a decimal from input until the only number left is one. However, once first loop reaches 0 it should beging looping again from first digit minus 1 like this, Input decimal for loop: 4 Your loop result is: 4321 321…
user1552586
0
votes
1 answer

HLA example calling error

'm starting at the HLA world, and I'm trying to compile the example, CallingHLA, and HLA compile the code, I am getting the following error: Error in file "hlaFunc.hla" at line 76 [errid:82229/hlaparse.bsn]: Too few actual parameters. Near: << )…
Alexandre
  • 1,985
  • 5
  • 30
  • 55
0
votes
2 answers

Add Statement in high level assembly HLA

Hi I just want to add to variable and I can't figure out how to do it. static input: uns8; i:real32; noOfItems: uns8; I want noOfItems=numberOfItems + i;
Ahmed Masud
  • 614
  • 1
  • 10
  • 24
-1
votes
1 answer

saving numbers in heap memory and retrieving them the right way

first of i just wanna say im very new to coding and trying to learn. I have to write a HLA code for a program that lets u enter numbers. after each number is entered it gives u a new line to enter another number, until "0" is entered. then the…
trolldeg
  • 1
  • 1
-1
votes
2 answers

Problems with OpenRTI callbacks

How in the OpenRTI to make the rti send callbacks? For example, reserve a name with the reserveObjectInstanceName _rtiAmbassador->reserveObjectInstanceName(name); Errors: terminate called after throwing an instance of …
smilemax
  • 3
  • 1
-2
votes
2 answers

Don't understand shifting, rotating, and LAHF

For example, this is the assignment I have Write an HLA Assembly program that prompts for an int8 value to inspect and then prints it in binary format. For example, here would be the program output for various entered values Gimme a decimal value…
-3
votes
1 answer

HLA Assembly Recursive Fibonacci Program

I have written some code to solve this prompt: Create an HLA Assembly language program that prompts for a number from the user. Create and call a function that calculates a value in the Fibonacci sequence. In mathematics, the Fibonacci sequence is…
Jay
  • 1
  • 1
1 2 3 4
5