CST 111 -- Today's Exercises

1.   PEP-8 program:   Compare two numbers

Write a PEP-8 program that asks the user to enter two numbers.
You may need some of these PEP-8 instructions:
        DECI   num,d        ; Input a decimal number
        STRO   s,d          ; Output an ASCII string

        CPA    address,d    ; Compare AC to memory
        BREQ   label	    ; Branch if equal
And some of these PEP-8 pseudo-ops:
num1:  .BLOCK  2            ; Reserve a memory word
msg:   .ASCII  "string"     ; Store string in memory
       .BYTE   0            ; Zero byte ends string.

If the numbers are the same, say so and exit.
If the numbers are different, repeat.

Save your PEP-8 source code in a file named "x1.pep", in your folder.


2.   Java program:   name and shapes.

Write a "Processing" (Java) sketch to display the following on a light-green background:

Save your Processing source code in a file named "x2.pde", in your folder.