Skip to main content
Engineering LibreTexts

2.8: Exercises

  • Page ID
    28385
    1. Write a program which prompts the user to enter their favorite type of pie. The program should then print out "So you like _____ pie", where the blank line is replaced by the pie type entered. What annoying feature of syscall service 4 makes it impossible at this point to make the output appear on a single line?
    2. Using the syscall services, write a program to play a middle "C" for 1 second as a reed instrument using the Musical Instrument Digital Interface (MIDI) services. There are two services which produce the output? What is the difference between them?
    3. Write a program to print out a random number from 1..100.
    4. Write a program which sleeps for 4 seconds before exiting.
    5. Write a program to read and print a floating point number. What is strange about the registers used for this program?
    6. Explain the difference between an address and a value for data stored in memory.
    7. Write a program to open an input dialog box and read a string value. Write the string back to the user using a message box.
    • Was this article helpful?