Tutorials - SIC/XE input/output

Tutorials - SIC/XE input/output

Writing to a device

Write a program which writes a string "SIC/XE" and a new line onto the device AA. Trace the program in simulator.

  • Change the device and restart the program.
  • Which new files you get?

Writing a cat

Write a program which copies standard input to standard output.

Notice that, the device numbers for standard input, standard output, and standard error are 0, 1, 2, respectively.

Writing routines

Write a program which prints a text to standard output. Program should have several routines and a main part where these routines are tested. Be careful that routines preserve the registers. Write the following routines:

a) echoch - prints a character given in register A.

b) echonl - prints a newline character.

c) echostr - prints a string pointed at with a address given in register A. Use C-style strings, i.e., strings terminate with a code 0.

d) echonum - prints (decimally) a number stored in register A. Think before you write.

Last modified: Tuesday, 23 October 2018, 10:05 PM