music
OSdata.com: programming text book 

OSdata.com

stream output

summary

    This subchapter looks at stream output.

free computer programming text book project

table of contents
If you like the idea of this project,
then please donate some money.
more information on donating

Google

stub section

    This subchapter is a stub section. It will be filled in with instructional material later. For now it serves the purpose of a place holder for the order of instruction.

    Professors are invited to give feedback on both the proposed contents and the propsed order of this text book. Send commentary to Milo, PO Box 1361, Tustin, California, 92781, USA.

formatted output

    This subchapter looks at stream output.

BASIC    POS(x) — BASIC library function that returns the current position of the video terminal’s cursor..

ALGOL

    ALGOL has several common input procedures that allow the output of a character representation (such as to a line printer) of the major ALGOL data types.

    The basic form is as follows:

   outreal (output device, real varaible);

    The output device is an integer, which represents the output device or channel.

    The real variable contains the information to be outputted.

    The procedure translates the contents of the real variable into the equivalent character representation and outputs the character representation tot he designated output device. The output is a floating point number of 15 characters, icnluding the plus (positive) or minus (negative) sign.

    There are several similar procedures that output the contents of the major ALGOL data types.

   outinteger (output device, integer varaible);

   outarray (output device, array varaible);

   outstring (output device, literals);

    The outstring procedure is used to output character literals and blank spaces.

Ada

    “42/2 The predefined environment of the language provides for input-output and other capabilities by means of standard library packages. Input-output is supported for values of user-defined as well as of predefined types. Standard means of representing values in display form are also provided.” —:Ada-Europe’s Ada Reference Manual: Introduction: Language Summary See legal information

    “2 Finally, a predefined environment of standard packages is provided, including facilities for, among others, input-output, string manipulation, numeric elementary functions, and random number generation.” —:Ada-Europe’s Ada Reference Manual: Section 1: General See legal information

assembly language instructions

    Input/Output (I/O) instructions are used to input data from peripherals, output data to peripherals, or read/write input/output controls. Early computers used special hardware to handle I/O devices. The trend in modern computers is to map I/O devices in memory, allowing the direct use of any instruction that operates on memory for handling I/O.

  • OUT Output; MIX; initiate transfer of information from consecutive locations starting with M to the output device specified, block size implied by unit
  • IOC Input-Output Control; MIX; initiate I/O control operation to be performed by designated device
  • JRED Jump Ready; MIX; Jump if specified unit is ready (completed previous IN, OUT, or IOC operation); if jump occurs, J-register loaded with the address of the instruction which would have been next if the jump had not been taken
  • JBUS Jump Busy; MIX; Jump if specified unit is not ready (not yet completed previous IN, OUT, or IOC operation); if jump occurs, J-register loaded with the address of the instruction which would have been next if the jump had not been taken

MIX devices

    Information on the devices for the hypothetical MIX processor’s input/output instructions.

unit numberperipheralblock sizecontrol
tTape unit no. i (0 i 7)100 wordsM=0, tape rewound;
M < 0, skip back M records;
M > 0, skip forward M records
dDisk or drum unit no. d (8 d 15)100 wordsposition device according to X-register (extension)
16Card reader16 words 
17Card punch16 words 
18Printer24 wordsIOC 0(18) skips printer to top of following page
19Typewriter and paper tape14 wordspaper tape reader: rewind tape

See also Input/Output Instructions in Assembly Language


free music player coding example

    Coding example: I am making heavily documented and explained open source code for a method to play music for free — almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).

    View music player in action: www.musicinpublic.com/.

    Create your own copy from the original source code/ (presented for learning programming).


return to table of contents
free downloadable college text book

view text book
HTML file

Because I no longer have the computer and software to make PDFs, the book is available as an HTML file, which you can convert into a PDF.

previous page next page
previous page next page

free computer programming text book project

Building a free downloadable text book on computer programming for university, college, community college, and high school classes in computer programming.

If you like the idea of this project,
then please donate some money.

send donations to:
Milo
PO Box 1361
Tustin, California 92781

Supporting the entire project:

    If you have a business or organization that can support the entire cost of this project, please contact Pr Ntr Kmt (my church)

more information on donating

Some or all of the material on this web page appears in the
free downloadable college text book on computer programming.


Google


Made with Macintosh

    This web site handcrafted on Macintosh computers using Tom Bender’s Tex-Edit Plus and served using FreeBSD .

Viewable With Any Browser


    †UNIX used as a generic term unless specifically used as a trademark (such as in the phrase “UNIX certified”). UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd.

    Names and logos of various OSs are trademarks of their respective owners.

    Copyright © 2010 Milo

    Created: October 31, 2010

    Last Updated: November 24, 2010


return to table of contents
free downloadable college text book

previous page next page
previous page next page