CSC231 Homework 4 2014

From dftwiki3
Revision as of 07:11, 21 October 2014 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- <bluebox> The assignment is due on 10/28/10 at 11:55 p.m. </bluebox> =Problem #1: Addressing modes and one-dimensional arrays= Assume that your data section is ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut (talk) 07:11, 21 October 2014 (EDT)


The assignment is due on 10/28/10 at 11:55 p.m.

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.