edu.cornell.cs.sam.core
Interface Video

All Known Implementing Classes:
SamGUI, SamText, TestScript.Test

public interface Video

The Video interface allows the processor to output data or to request input. If a video implementation is not provided to the processor, SaM READ commands will place a 0 on the stack, and WRITE commands will not output any data


Method Summary
 char readChar()
          Request character input from the video implementation
 float readFloat()
          Request floating point input from the video implementation
 int readInt()
          Requests integer input from the video implementation
 java.lang.String readString()
          Request String input from the video implementation
 void writeChar(char c)
          Writes character output to the video implementation
 void writeFloat(float f)
          Writes floating point output to the video implementation
 void writeInt(int i)
          Writes integer output to the video implementation
 void writeString(java.lang.String str)
          Writes string output to the video implementation
 

Method Detail

writeInt

void writeInt(int i)
Writes integer output to the video implementation

Parameters:
i - The integer to be written

writeString

void writeString(java.lang.String str)
Writes string output to the video implementation

Parameters:
str - The string to be written

writeFloat

void writeFloat(float f)
Writes floating point output to the video implementation

Parameters:
f - The float to be written

writeChar

void writeChar(char c)
Writes character output to the video implementation

Parameters:
c - The character to be written

readInt

int readInt()
Requests integer input from the video implementation

Returns:
The integer received

readFloat

float readFloat()
Request floating point input from the video implementation

Returns:
The floating point number received

readChar

char readChar()
Request character input from the video implementation

Returns:
The character received

readString

java.lang.String readString()
Request String input from the video implementation

Returns:
The String received