Quiz 6

Quiz 6 - INBOUND DB 15 DUP(?) OUT_OF_BOUND DB 15 DUP(?) MOV...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Quiz 6 Write a program to read the contents of an array called LIST then separate then into two other arrays according to the following rule: a number X is considered to be inbound if -7<=X <=33, otherwise the number is considered out of bounds. The variable COUNT contains the number of elements in the LIST array. COUNT DB 15 LIST DB -11, 2, 3, -4, -50, 66, 77, 8, 91, 100, -8, 6, 4, 77, -66
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: INBOUND DB 15 DUP(?) OUT_OF_BOUND DB 15 DUP(?) MOV CX, COUNT MOV BX, 0 MOV DI, 0 MOV SI, 0 AGAIN: MOV AL, LIST [BX] .IF AL >= -7 && AL <=33 (DOT command) MOV INBOUND [DI], AL INC DI .ELSE MOV OUT_OF_BOUND [SI], AL INC SI .ENDIF INC BX LOOP AGAIN LIST-11, 2, 3, -4, -50, 66, 77, 8, 91, 100, -8, 6, 4, 77, -66 IN 2, 3, -4, 8, 6, 4, OUT-11, -50, 66, 77, 91, 100, -8, 77, -66...
View Full Document

This test prep was uploaded on 04/20/2008 for the course EE 3750 taught by Professor Desouza during the Spring '08 term at LSU.

Ask a homework question - tutors are online