City University of New York



Table of contest: Objective …………………………………………………………….….page 2Theory …………………………………………………………………...page 2Calculated values…………………………………………………….page 3-6Program…………………………………………………………….……Page 3-6 Mnemonics…………………………………………………………....Page 3-6Flow chart………………………………………….....……………….Pare 3-6OP Codes ………………………………………………………....……Page 3-6Questions and Answers………………................………….Page 3-6Conclusion……………………………………………………………...Page 6eObjective The objective of this lab report is to write and test an assembly program that displays the moving message “PEPSI” on the address field of your sdk-8085 with a moving speed of one character per second.TheoryThe theory is using appendix F to write a program to display pass fail and blank using the call command CD02B7. 02B7 is a call command that uses flags to determine whether to display data in address or data field, or both. Display Flag is appointed by register A and the Dot Flag is appointed by register B. When loading register A with 00 means you are displaying data in the address field. When loading register A with 01 it means that you are displaying data in data field. When loading register B with 00 it means there is no dots in the display. When loading register B with 01 it means that there will be a dot in the right edge of the data field. Also HL addresses the output to the display. The CD 02B7 is a 3 byte instruction and it take 18 cycle to execute. All data is destroyed when using the CD call if there is any important data that need to be saved be sure to push them and later you call always pop that data for use. Writing a program using the JMP commands to keep the program in a loop to display PASS FAIL BLANK in an endless loop. First we have to load the data that represents the characters in the memory location. This way before calling 02B7 we load HL with the beginning of the data that represents the characters. All characters are represented in the table below. CHARHEX.000101202303404505606707808909A0AB0BC0CD0DE0EF0FH10L11P12I13r14BK15ProcessUsing subroutines output 02B7 and delay 05F1. Draw a clear flow chart of the solution, and convert the flowchart in mnemonics assembler code and ram locations. Memory location Hex Character Data 2000BK152001BK152002BK152003P122004E0E2005P122006S052007I132008BK152009BK15200aBK15MEMORY LOCATION OP CODEFLOW CHART MNEMONICS BYTES CYCLES 201031[SP]<-|20C2|LXI SP, 20C23102011C2201220201321[HL]<-|2000|LXI H, 20003102014002015202016E5PUSH HPUSH H11220173E[A]<-|00|MVI A , 00 27201800201906[B]<-|00|MVI B, 0027201A00201BCDCALL 02B7CD 02B7 318201CB7201D02201E3E[A]<-|02|MVI A, 0227201F022020 F5PUSH PSWPUSH PSW112202111[DE]<-|F696|LXI D, F6963102022962023F620241B[DE]<-[DE]-|1|DCX D1620257A[A]<-[D]MOV A,D142026B3[A]<-[A]V[E]ORA E142027C2JNZ 2024JNZ 202437/10202824202920202AF1POP PSWPOP PSW 110202B3D[A]<-[A]-|1|DCR A14202CC2JNZ 2020JNZ 202037/10202D20202E20202FE1POP HPOP H110203023[HL]<-[HL]+|1|INX H1620313E[A]<-|0B|MVI A, 0B 2720320B2033BD[A]<->[L]CMP L142034C2JNZ 2016JNZ 201632035162036202037CFEND RST1112TOTAL 40 BYTESTIME DELAY1 = 330 × 10-9{ 48 × X10 + 106 + 130}=> 1330 × 109 = 48 × X10 + 236=>= 48 × X10 = 1330 × 109 -236=> X10 = 1330×48 × 109 -236=> X10 = 63,126Hex= F695E) MODEFY THE FLOW CHART AND PROGRAM SO THAT THE MOVING MESSAGE “PEPSI” OS DISPLAYED 3 TIMES THE FIRST TIME WITH A MOVING SPEED OF 1 SECOND THE SECOND TIME WITH A MOVING SPEED OF 2 SECONDTHE 3RD TIME WITH A MOVINS SPEED OF 3 SECONDS. MEMORY LOCATION OP CODES FLOW CHART MNEMONICS BYTES CYCLES 201031[SP]<-20C2LXI SP, 20C23102011C2201220201301[BC]<-|0302|LXI B, 03023102014022015032016C5PUSH B PUSH B112201721[HL]<-|2000|LXI H, 2000310201800201920201AE5PUSH H PUSH H112201B3E[A]<-|00|MVI A, 0027201C00201D06[B]<-|00|MVI B,0027201E00201FCDCALL 02B7CD 02B73182020 B72021022022C1POP BPOP B110202379[A]<-[C]MOV A,C142024C5PUSH BPUSH B 1122025F5PUSH PSWPUSH PSW112202611[DE]<-| |LXI D, XXXX3102027202820291B[DE]<-[DE]-|1|DCX D16202A7A[A]<-[D]MOV A, D14202BB3[A]<-[A]V[E]ORA E14202CC2JNZ 2029JNZ 202937/10202D29202E20202FF1POP PSWPOP PSW11020303D[A]<-[A]-|1|DCR A142031CEJNZ 2025JNZ 202537/102032252033202034E1POP H POP H110203523[HL]<-[HL]+|1|INX H1620363E[A]<-|0B|MVI A, 0B2720370B2038BD[A]<->[L]CMP L142039C2JNZ 201AJNZ 201A37/10203A1A203B20203CC1POP B POP B110203D0C[C]<-[C]+|1|INR C14203E0C[C]<-[C]+|1|INR C14203F78[A]<-[B]MOV A, B1420403D[A]<-[A]-|1|DCR A142041C2JNZ 2016JNZ 201637/102042162043202034CFENDRST1112 TOTAL 53 BYTESTIME DELAY 1 = 330 × 10-9{ 48 × X10 + 106 + 158}=> 1330 × 109 = 48 × X10 + 264=>= 48 × X10 = 1330 × 109 -264=> X10 = 1330×48 × 109 -264=> X10 = 63,125HEX= F695CONCLUSION In this lab report we have learned how to develop a program that displays a moving massage such as “PEPSI” in the address field with various display speeds. We also have learned to calculate speed time by using the time delay theory. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches