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

HLA Adding Up All The Numbers Between One And n

Assembly Language Write a program that computes (n)(n+1)/2. It should read the value “n” from the user. Hint: you can compute this formula by adding up all the numbers between one and n. I have a challenge in writing the above code in HLA. I have…
Victor Omondi
  • 58
  • 2
  • 5
0
votes
0 answers

HLA compilation problem with deprecated architecture

When I am trying to compile program, a problem show up My steps: 1) hlaparse -v -sg -test "p2.hla" 2) hla -v p2 Linking via [ld -arch i386 -o "p2" "p2.o" "/Users/( ͡° ʖ̯ ͡°)/Desktop/hla/a/hlalib.a"] ld: warning: No version-min specified on…
0
votes
1 answer

How to process a number taken as byte

I'm trying to take in a byte of information, really number and compare them. My comparisons are generating the wrong input. Here's the code. program dateDemo; #include ("stdlib.hhf") static dayR: byte; monthR: byte; yearR: word; …
MaxAttax
  • 67
  • 6
0
votes
1 answer

Assembly language number conversion

Hey I'm currently taking assembly language and I got stuck for understanding the conversion routine any Hex/bi/oct number to decimal program ConvertToDecimal; #include( "stdlib.hhf" ) static value: int32; begin ConvertToDecimal; stdout.put( "Input…
Helix
  • 3
  • 2
0
votes
0 answers

Calculate Effective Address Register in z/OS

5.5.2.(3)+ Suppose the contents of the general registers are as follows: C(GR0) = 00010A20 C(GR8) = 8031B244 C(GR1) = 42319B7C C(GR9) = 00000010 C(GR2) = 91F0F002 C(GR10) = 723B94C1 C(GR3) = 1002340A C(GR11) = E931AB7F C(GR4) = 00FF00FF C(GR12)…
0
votes
0 answers

HLA compilation error

Cannot understand what is wrong. Thanks for help program first; #include("stdlib.hhf"); static x: int16; y: int16; result1: int16; input: char; isEnd: char := 'n'; begin first; stdout.put("x = "); stdin.get(x); …
0
votes
1 answer

HLA password program with dynamic memory allocation

This HLA program is to ask the user for a certain number of passwords, let the user enter them in twice for verification (MISMATCH is no match). Everything works fine, but if I would enter in two passwords, such as qwerty and foo, it would only…
0
votes
1 answer

Where could be the probable fix on the error

I'm exploring the examples of a HLA tutorial for a better understanding. I tried to assemble and run it but failed to get the output. After I assembled it, it showed me this error: Error in file "001_HelloWorld.hla" at line 87…
0
votes
0 answers

Programming with HLA

I have been wanting to program with Assembly for a while now, and have finally found myself a good way to start getting involved with it. I read a little bit on the "High Language Assembly" standard library, however, I have no idea how to start…
Keto Z
  • 49
  • 1
  • 7
0
votes
1 answer

HLA Surface area program error in output

Write an HLA Assembly language program that computes the surface area based on a radius. A sample program dialogue is shown below. However you decide to do it, your main program should include calling a procedure or function (atleast one...) to…
ceemorales
  • 11
  • 2
0
votes
0 answers

How to preserve registers in HLA Assembly

I went ahead and wrote my code and the program works perfectly fine. program recursiveSubtractionProgram; #include( "stdlib.hhf" ); static zA : int32; zB : int32; zResult : int32; procedure recursiveSubtraction( a: int32; b :…
0
votes
0 answers

Code isn't subtracting 1

I'm currently trying to learn assembly but I'm having a bit of a hard time This is what I have so far // File: squaretable.hla program squaretable; #include( "stdlib.hhf" ); static zBeginNum: int32; //Create…
0
votes
0 answers

Hla assembly exception with division

When Im using this bit of the code I get an exception. At least this what I get from the school's compiler. The value of i,j is given, j= 348 and i= 457830 (i is declared as int 32 and j is declared as int16) mov(i,eax); movzx(j,ebx); …
0
votes
0 answers

Surface Area Assembly Program

I am working on an assembly, technically HLA(High Level Assembly) assignment. Here is my assignment: Write an HLA Assembly language program that computes the surface area based on a radius. A sample program dialogue is shown below. However you…
ecain
  • 1,282
  • 5
  • 23
  • 54
0
votes
1 answer

Assembly program that identifies if parameters are different or same.

Hi I am working on an assembly, technically HLA(High Level Assembly) assignment and I am a bug that I need help with. Here is the assignment: Write an HLA Assembly language program that implements a function which correctly…
ecain
  • 1,282
  • 5
  • 23
  • 54