The Art of Assembly Language by Hyde Randall
Author:Hyde, Randall [Randall Hyde]
Language: eng
Format: epub, mobi
Tags: COMPUTERS / Programming Languages / Assembly Language
ISBN: 9781593273019
Publisher: No Starch Press
Example 5-20. Main program that references external objects
program main; #include( "stdlib.hhf" ); begin main; mov( 2, Var2 ); mov( 3, Var1 ); Add1and2(); stdout.put( "Var1=", Var1, nl ); end main;
The main program references Var1, Var2, and Add1and2, yet these symbols are external to this program (they appear in unit Number1). If you attempt to compile the main program as it stands, HLA will complain that these three symbols are undefined.
Therefore, you must declare them external with the external option. An external procedure declaration looks just like a forward declaration except you use the reserved word external rather than forward. To declare external static variables, simply follow those variables' declarations with the reserved word external. The program in Example 5-21 is a modification to the program in Example 5-20 that includes the external declarations.
Example 5-21. Modified main program with external declarations
program main; #include( "stdlib.hhf" ); procedure Add1and2; external; static Var1: uns32; external; Var2: uns32; external; begin main; mov( 2, Var2 ); mov( 3, Var1 ); Add1and2(); stdout.put( "Var1=", Var1, nl ); end main;
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Ada | Ajax |
Assembly Language Programming | Borland Delphi |
C & C++ | C# |
CSS | Compiler Design |
Compilers | DHTML |
Debugging | Delphi |
Fortran | Java |
Lisp | Perl |
Prolog | Python |
RPG | Ruby |
Swift | Visual Basic |
XHTML | XML |
XSL |
Hello! Python by Anthony Briggs(9946)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9820)
The Mikado Method by Ola Ellnestam Daniel Brolund(9813)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8332)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7810)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7788)
Grails in Action by Glen Smith Peter Ledbrook(7719)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7590)
Windows APT Warfare by Sheng-Hao Ma(7146)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6879)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6764)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6443)
Kotlin in Action by Dmitry Jemerov(5092)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4340)
Solidity Programming Essentials by Ritesh Modi(4162)
Functional Programming in JavaScript by Mantyla Dan(4059)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3962)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3908)
The Ultimate iOS Interview Playbook by Avi Tsadok(3877)
