CSC231 Homework 4

From dftwiki3
Revision as of 15:16, 1 October 2008 by Thiebaut (talk | contribs) (New page: <meta name="keywords" content="computer science, assembly language, pentium, exercise, machine language, intel" /> <meta name="description" content="Dominique Thiebaut's Web Page" /> <meta...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<meta name="keywords" content="computer science, assembly language, pentium, exercise, machine language, intel" /> <meta name="description" content="Dominique Thiebaut's Web Page" /> <meta name="title" content="Dominique Thiebaut -- Computer Science" /> <meta name="abstract" content="Dominique Thiebaut's Computer Science Web pages" /> <meta name="author" content="thiebaut at cs.smith.edu" /> <meta name="distribution" content="Global" /> <meta name="revisit-after" content="10 days" /> <meta name="copyright" content="(c) D. Thiebaut 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,2008" /> <meta name="robots" content="FOLLOW,INDEX" />

Back to CSC231 Main Page


Assignment #4

Problem #1: Addressing modes and one-dimensional arrays

Assume that your data section is initialized with the following variables:

     msg     db    3,"ALL",11,"PROGRAMMERS",3,"ARE",11,"PLAYWRIGHTS"
             db    3,"AND",3,"ALL",9,"COMPUTERS",3,"ARE",5,"LOUSY"
             db    6,"ACTORS"
     N       equ   10


Note that the msg contains byte numbers followed by words. The byte number preceeding a word corresponds to the number of letters in the word. So '3,"ALL"' for example means that the word that follows 3 is a 3-character word. '11,"PROGRAMMERS"' means that the string following the byte that contains 11 is an 11-character word.

N represents the total number of words in the string msg.

Your assignment is to write a program that uses one or several loops that go N times and that print all the words on separate lines, one after the other, such that each word is capitalized, i.e. its first letter is uppercase, and the others are lowercase.

Save your program in a file called hw4.asm which you will submit as follows:


          submit  hw4  hw4.asm


Problem #2: Arduino