****************************************************************************** * * * Nathan Balon * * SN# 3210 1717 * * CIS 310 * * Winter 2004 * * Program #1 * * * * The program finds the largest value in an array of bytes. * * The purpose of this program is to become familiar with the * * 68000 similator. * * * ****************************************************************************** * * ORG $400 Program orgin MOVEA.L #Data,A0 Use A0 as a pointer CLR.B D0 Clear D0 Next MOVE.B (A0),D1 REPEAT: Read a byte BEQ Exit IF data == 0 exit CMP.B D0,D1 IF new > old BLE EndTest MOVE.B D1,D0 THEN old = new EndTest ADDA.L #1,A0 Point to next byte in the array BRA Next END REPEAT Exit STOP #$2700 Halt processor at the end of program * ORG $1000 Data orgin Data DC.B 12,13,5,6,4,8,4,10,0 Sample data END $400 Program terminator and entry point