Freeware assember ASxx.EXE Ver 1.03. 0001 * E-MAIL: nsitarsk@umd.umich.edu harris_brandon@yahoo.com 0002 * Name:Nick Sitarski Brandon Harris 0003 * Course: ECE 372 0004 * Term:Summer 2002 0005 * 0006 * Revision History 0007 * 0008 * First Draft: 5/19/02 0009 * -Progress: 0010 * 0011 * Most Recent Revision: 5/19/02 0012 * -Progress: 0013 * 0014 * Date Submitted: 0015 * Demonstration Approval: ______ 0016 * 0017 * MEMORY MANAGEMENT 0018 * 0019 * Program starts at: $2000 0020 * Data starts at: $3000 0021 0022 ******************************************* 0023 *Set Equates 0024 0025 0020 SPACE EQU $20 0026 ffb8 OUTA EQU $FFB8 0027 ffbb OUT1BYT EQU $FFBB 0028 ffc7 OUTSTRG EQU $FFC7 0029 ffbe OUT1BSP EQU $FFBE 0030 ffc1 OUT2BSP EQU $FFC1 0031 0032 0033 *Store in some data starting at $3100 0034 0035 3100 ORG $3100 0036 3100 16 FCB $16 0037 3101 a3 FCB $A3 0038 3102 20 FCB $20 0039 3103 ff FCB $FF 0040 3104 80 FCB $80 0041 3105 27 FCB $27 0042 3106 c3 FCB $C3 0043 3107 cb FCB $CB 0044 3108 47 FCB $47 0045 3109 de FCB $DE 0046 310a 13 FCB $13 0047 310b c3 FCB $C3 0048 310c 87 FCB $87 0049 310d 3a FCB $3A 0050 310e ab FCB $AB 0051 310f cd FCB $CD 0052 0053 *Now lets begin the program 0054 0055 2000 ORG $2000 *Start program at $2000 0056 2000 ce 00 00 ldx #$0000 *Sets accumulator x to 0 0057 2003 86 10 ldaa #$10 0058 2005 18 ce 31 00 LDY #$3100 0059 0060 2009 18 e6 00 LOOP ldab 0,Y *Load Accumulator b with value from memory 0061 200c 3a ABX *Add B to X 0062 200d 18 08 INY *Increment Y 0063 200f 4a DECA *Decrement A 0064 2010 27 02 BEQ SAVE *Branch to Save if Z flag = 1 0065 2012 20 f5 BRA LOOP *Branch to Loop If z flag = 0 0066 0067 2014 ff 30 10 SAVE STX $3010 *Store X 0068 0069 2017 ce 31 00 lDX #$3100 *Load accumulator a with mem location $3100 0070 201a c6 10 LDAB #$10 *Load Accumulator b with $10 0071 0072 201c a6 00 LOOP2 LDAA 0,X *loading accumulator b with data in $3100 0073 201e bd ff bb JSR OUT1BYT *Print data in accumulator b 0074 2021 5a DECB *DECB 0075 2022 27 02 BEQ NEXT *If z flag = 1 go to next 0076 2024 20 f6 BRA LOOP2 *If z flag = 0 go to loop2 0077 0078 0079 2026 86 20 NEXT LDAA #SPACE 0080 2028 bd ff b8 JSR OUTA 0081 202b 86 20 LDAA #SPACE *types out the 2 spaces 0082 202d bd ff b8 JSR OUTA 0083 0084 2030 ce 30 10 ldx #$3010 0085 2033 bd ff bb JSR OUT1BYT 0086 2036 ce 30 11 ldx #$3011 0087 2039 bd ff bb JSR OUT1BYT 0088 0089 203c 3f SWI 0090 0091 0092 0093 0094 0095 0096 0097 Number of errors 0