AppendixL - HLA Code Generation for HLL Statements HLA Code...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
HLA Code Generation for HLL Statements Beta Draft - Do not distribute © 2001, By Randall Hyde Page 1541 HLA Code Generation f or HLL Statements Appendix L One of the principal adv antages of using assembly language o v er high le v el languages is the control that assembly pro vides. High le v el languages (HLLs) represent an abstraction of the underlying hardw are. Those who write HLL code gi v e up this control in e xchange for the engineering ef fi ciencies enjo yed by HLL programmers. Some adv anced HLL programmers (who ha v e a good mastery of the underlying machine architecture) are capable of writing f airly ef fi cient programs by recognizing what the compiler does with v arious high le v el control constructs and choosing the appropriate construct to emit the machine code the y w ant. While this “lo w-le v el programming in a high le v el language” does lea v e the programmer at the merc y of the compiler -writer , it does pro vide a mechanism whereby HLL programmers can write more ef fi cient code by chosing those HLL constructs that compile into ef fi cient machine code. Although the High Le v el Assembler (HLA) allo ws a programmer to w ork at a v ery lo w le v el, HLA also pro vides structured high-le v el control constructs that let assembly programmers use higher -le v el code to help mak e their assembly code more readable. Those assembly language programmers who need (or w ant) to e x ercise maximum control o v er their programs will probably w ant to a v oid using these statements since the y tend to obscure what is happening at a really lo w le v el. At the other e xtreme, those who w ould al w ays use these high-le v el control structures might question if the y really w ant to use assembly language in their applications; after all, if the y’ re writing high le v el code, perhaps the y should use a high le v el language and tak e adv antage of optimizing technology and other f anc y features found in modern compilers. Between these tw o e xtremes lies the typical assembly language programmer . The one who realizes that most code doesn’ t need to be super -ef fi cient and is more interested in producti v ely producing lots of softw are rather than w orrying about ho w man y CPU c ycles the one-time initialization code is going to consume. HLA is perfect for this type of programmer because it lets you w ork at a high le v el of abstraction when writing code whose performance isn’ t an issue and it lets you w ork at a lo w le v el of abstraction when w orking on code that requires special attention. Between code whose performance doesn’ t matter and code whose performance is critical lies a big gray re gion: code that should be reasonably f ast b ut speed isn’ t the number one priority . Such code needs to be reasonably readable, maintainable, and as free of defects as possible. In other w ords, code that is a good candidate for using high le v el control and data structures if their use is reasonably ef fi cient. Unlik
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/08/2011 for the course CS 101 taught by Professor Jitenderkumarchhabra during the Summer '11 term at National Institute of Technology, Calicut.

Page1 / 20

AppendixL - HLA Code Generation for HLL Statements HLA Code...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online