You are on page 1of 2
ECE 4436 August 25, 2005 HW#3 | fp a Purple Book Problems 3.2. Give the symbol used when specifying a constant in the following bases: hexadecimal, decimal, binary, ASCII. Prefix Suffix Decimal: ! T Binary: % Q Hexadecimal: $ H iid ASCII: Constants are signified by enclosing the character in single quotes (‘ *) or double quotes (*”) 3.3 What assembler pseudooperation is used to define strings of SCL characters? © Strings of ASCII characters may be defined with the DefineByte (DB) directive. 3.6 What assembler pscudooperation is used to set the assembler’s location counter? © The ORG pseudooperation is used to set the assembler’s, ieesiovd ter. 3.8 Your hardware designer tells you that the microcontroller will have ROM located at address $E000 to SFFFF and RAM at $0800 and $OFFF. Show how to inform the assembler so that it locates its code and data areas properly. * ROM: EQU ‘SE000 ee RAM: EQU 50800 ( DRG Rom or RAM Hoo dere e 4000 symob1 Table Cook $4000 Rudare $008 sta —- #/008 Lew fooot fave fore Entry $ 4000 fyooe ‘Boorse, hw3b. txt Equ $4000 ;lower EEPROM block EQU $0800 tart of RAM EqU $1000 jend of RAM + 1 User Equates Len: QU 8B slength of table Local pata - read/write ORG ——_RWOATA table: 05.8 LEN ;to be filled in with integers ee ee eee eee cctsanreeteaseeeneeeee ORG = CODE Entry: aH : lds #STACK vinit stack pointer Initialization daa #LEN cirb dy #tablesten init cntr to # entries lear integer counter init table pointer past end Loop, filling the table with integers Joop: ‘inch yincrement to next integer stab 1-y jstore into table from end dbne a, 100p Hoop back if not done 3 Al] done bra, entry jdo_ it again Interrupt vectors = ORG = SFFFE Dc.w Entry eset, Page 1

You might also like