New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Brandon Douglas


Brandon Douglas
GPA 3.75

Amauri Arroyo

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Amauri Arroyo
Class Notes
25 ?




Popular in Course

Popular in Electrical Engineering

This 3 page Class Notes was uploaded by Brandon Douglas on Friday September 18, 2015. The Class Notes belongs to EEL 3701 at University of Florida taught by Amauri Arroyo in Fall. Since its upload, it has received 5 views. For similar materials see /class/206824/eel-3701-university-of-florida in Electrical Engineering at University of Florida.

Similar to EEL 3701 at UF

Popular in Electrical Engineering




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/18/15
University of Florida Department of Electrical amp Computer Engineering Page 13 EEL370l4744 ASSEMBLY LANGUAGE NOTES Drs E Schwartz amp A Arroyo Professors in ECE 21Aug98 540 PM AS11 Assembler for the 68HC11 Programs written in assembly language consist of a sequence of source statements Each source statement consists of a sequence of ASCII characters ending with a carriage return SOURCE STATEMENT Each source statement may include up to four elds a label or 3939 for a comment line an operation instruction mnemonic or assembler directive an perand and a comment Label A symbol starting in the rst column is a label and may optionally be ended with a colon An asterisk as the rst character in the label eld indicates that the rest of the source statement is a comment Comments are ignored by the assembler and are printed on the source listing only for programming information A w 39eiytwe character blank or tab as the rst character indicates that the label eld is empty The line has no label and is not a comment A symbol character as the rst character indicates that the line has a label Symbol characters are the upper or lower case letters az digits 09 and the special characters period dollar sign 3 and the underscore Symbols consist of one to een characters the rst of which must be alphabetic or the special characters perio or underscore c aracters are signi cant and upper and lower case letters are distinct N w A symbol may occur only once in the label eld If a symbol does occur more than once in a label eld then each reference to that symbol will be agged with an error With the exception of some directives a label is assigned the value of the program counter PC of the rst byte of the instruction or data being assembled The value assigned to the label is absolute Labels may be ended with a colon although the colon is not part of the label it only acts to set the label off from the rest of the source line Thus the following code fragments are equivalent Fragment 1 Fragment 2 here deca here deca bne here b here A label may appear on a line by imelf The assembler interprets this as set the value of the label equal to the current value ofthe PC For example The symbol table has room for at least 2000 symbols of length 8 characters or less Additional characters up to 15 are permissible at expense of decreasing the maximum number of symbols possible in the table Operation Field The operation eld occurs a er the label eld and must be preceded by at least one white space character The operation eld must contain a legal opcode mnemonic or an assembler directive Upper case characters in this eld are converted to lower case before being checked as a legal mnemonic Thus 39nop39 NOP39 and 39NoP39 are recognized as the same mnemonic Entries in the operation eld may be one oftwo types Opcode 1y nemonicl These correspond directly to the machine instructions Note that register names sometimes appear at the end of a mnemonic eg NEG or STAE and therefore must not be separated by any whitespace characters Thus 39C LRA39 means clear accumulator 39A39 but that 39C LR A means clear memory location 39A39 Directive These are special operation codes known to the assembler which controls the assembly process rather than being translated into machine instructions Operand Field The operand eld39s interpretation is dependent on the comma of the operation eld The operand field if required must follow the operation eld and must be preceded by at least one whitespace character The operand eld may contain a symbol an expression or a combination of symbols and expressions separated by commas The operand eld of machine instructions is used to specify the addressing de of the instruction as well as the operand of the instruction The following table summarizes the operand eld for the M68HC11 processor Operand Format Addressing Mode operand Accumulator and Inherent Direct Extended or Relative ltexpressiongt Immediate ltexpressiongtX or Y Indexed with X or Y Register NOTE Parenthesis 3939 signify optional elements and 39ltgt denote an expression is inserted tax e ements are present only for clarification of the format and are not inserted as part of the actual source program All other characters are signi cant and must be used when re uired Expression An expression is a combination of symbols constants algebraic or logical operators and parentheses The expression speci es a value which is to be used as an operand Expressions may consist of symbols or constants joined together by one of the following operators 7 3 a l A They are evaluated left to right and there is no provision for parenthesized expressions Arithmetic is carried out in signed twoscomplernent integer precision 16 bits on the IBM PC Oper ator Symbol Each symbol is associated with a 16bit integer value which is used in place of the symbol during the expression evaluation The asterisk used in an expression as a symbol represents the current value of the PC A symbol is a string of characters with a noninitial digit The string of characters may be from the set arz AZ7 07915 39 39 and 39739 count as nondigits The S39 counts as a digit to avoid con ision with hexadecimal constants All characters of a symbol are signi cant with an ower case haract rs being distinct The maximum number of characters In a symbol is currently set at 15 The symbol table has room for at least 2000 symbols of length 8 characters Constant A constant represents a quantity of data that does not vary in value during the executing of a program Constants may be presented to the assembler in one of ve formats decimal hex binary octal or ASCII The default format is decimal The assembler converts all constants to binary and displays them in hex The rogrammer indicates the number format to the assembler with the following pre xes Decimal constants consist of up to 5 valid digits 09 and must be in the range 065535 inclusive Hex constants consist of up to four hex characters University of Florida Department of Electrical amp Computer Engineering Page 23 EEL370l4744 ASSEMBLY LANGUAGE NOTES Drs E Schwartz amp A Arroyo Professors in ECE 21Aug98 540 PM AS11 Assembler for the 68HC11 09 and AF are preceded by a S and must be in the range 0000 to SFFFF Binary constants consist of up to 16 ones and zeros preceded by a 00 Octal constants consist of up to six valid numeric digits 07 are preceded by an and must be in the range 0 to 177777 A single ASCII character can be used as a constant in expressions ASCII constants are preceded by a single quote 39 Any character including the single quote can be used as a character constant Iftoo man ASCII characters are given the assembler assembles the rst character and ignores the remainder Comment Field purposes The comment eld is separated from the operand eld or from the operation eld if no operation is required by at least one Whitespace character A comment is any text following the operands for a given mnemonic up to the end of a line A comment may also be either a line beginning with 3939 or an empty line Comments are ignored by the assembler and are printed on the source listing only for programming information Continuations If a line ends with a backslash 0 then the next line is fetched and added to the end of the first line This continues until a line is seen which doesn39t end in or until MAXBU39F characters have been collected MAXBUF 2 256 AS11 ASSEMBLER The assembler output includes an optional listing of the source program and an object file which is in the Motorola SRecord Format The assembler will normally suppress the printing of the source listing but this condition and others can be overridden via options supplied on the command line or within the source program via pseudo opcodes OPT Each line of the listing contains a reference line number the address and bytes assembled and the original source input line The assembler for the M68HC11 is named asII exe Command line arguments specify the lenarnes to assernb e Assembler Invocation To run the assembler enter the following command line asll filel fileZ optionl optionZ where filel fileZ etc are the names of the source les you want to assemble The source lenarnes may have extensions but the assembler does not check for any particular extension however do not use the 819 extension since that is the extension of the object le created by the assembler Its creation would overwrite the source le when it is written to The assembler accept options from the command line to be included in the assembly These options are the following If this method of passing commands to the assembler is used rather than the OPT pseudo opcode a space should separate the minus sign from the last le name and the rst option For example ExiFILE fl cre This command assembles le ExiFILE with an output listing and a cross reference table The object le created is written to disk and given the name ilename ame is the name of the rst source le speci ed on the command line Any errors and the optional listing if specified are written to the standard output normally displayed on the screen The listing andor error messages may be saved to a file for later examination or printing by appending an io redirection 39gt39 command to the command line If multiple les are assembled the 39S139 le will be placed under the rst le39s name filel 19 The example command line as l l myfi l e runs the M68HC11 assembler on the source file myfile The object le d any errors would appear on the The example command line 1 testl asm testZ 5 1 runs the HC11 assembler on the source les testl asm and 39testZ s39 The object le would be written to testl 519 and any errors and the assembly listing would appear on the screen The example command line testl asm teStZ S l cre Sgttest lSt runs the HC11 assembler on the source files testl asm and testZ 5 The object le would be written to tes t s I 9 A listing would be created followed by a crossreference and symbol table which would all be written to the le test lst The listing le contains the address and bytes assembled for each line of input followed by the original input line unchanged but moved over to the right some If an in ut line causes more than 6 bytes to be output eg a long FCC directive additional bytes up to 64 are listed on succeeding lines with no address preceding thern Equates cause the value of the expression to replace the address eld in the listing Equates that have forward references cause Phasing Errors in Pass 2 Error Messages Error diagnostics are placed in the listing le just before the line containing the error Format ofthe error line is L ineinumbe r Description of error Lineinumbe r Warning Description of error Errors of the rst type in pass one cause cancellation of pass two Warnings do not cause cancellation of pass two but should cause you to wonder where they came from Error messages are meant to be selfexplanatory If more than one le is being assembled the le name precedes the error Fileiname Lineinumbe r Description of error Finally some errors are classed as fatal and cause an immediate termination of the assembly Generally these errors occur when a temporary file cannot be created or is lost during the assembly Consult your local guru if this ha ens


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.