GRASS (programming language): Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
m Alter: journal. | You can use this bot yourself. Report bugs here. | User-activated.
Note not needed. Clarifying which "DOS."
Line 18:
The Z-Box was a [[raster graphics]] machine, unlike the original GRASS systems, so while most of the GRASS3 style was maintained in Zgrass, it added a number of commands dedicated to raster images. This included an extensive set of [[bit blit|bit block transfer]] commands in order to simulate [[sprite (computer science)|sprite]]s, something the hardware didn't include.{{sfn|DeFanti|1980}} The work would never be released by Midway, but the Circle would produce machines based on it as the [[Datamax UV-1]].
 
The last version of GRASS was '''RT/1''', a port of GRASS to other platforms that divorced the language from the display model and allowed it to be ported to other platforms. Versions existed for [[MS-DOS]], [[Microsoft Windows|Windows]], [[Silicon Graphics|SGI]] platform using [[OpenGL]], [[HP-UX]], [[AIX operating system|AIX]], [[Apple Macintosh|Macintosh]] and [[Amiga]].{{sfn|DeFanti|1980}} The language remains similar to the earlier versions, so the reason for the change of name is unclear.
 
== Description ==
Line 28:
Most BASIC [[interpreter (computer software)|interpreters]] of the era converted the input text into a ''[[Lexical analysis|tokenized]]'' version in which each of the commands was replaced by a single number (typically one [[byte]] long). This made the program run faster because it didn't have to continually decode the commands from the strings every time. Zgrass's use of string-based macros made this difficult, so they didn't bother with tokenization. Instead they included a [[compiler]] which could be used on any particular macro, speeding it up many times. Programs would often consist of a mix of compiled and uncompiled macros.
 
Line numbers were optional in Zgrass, and typically only appeared on lines that were the target of a <code>GOTO</code>. Most BASIC interpreters required line numbers for every line of code, but this was due to their use in the "line editor"&ndash;if you needed to edit ''that'' line, the only way to refer to it was by number. Zgrass used a more advanced full-screen editor that eliminated this need.<ref group=notes>As was the case for [[True BASIC]] and most dialects after that time.</ref> Zgrass allowed any string to act as a "line number", <code>GOTO 10</code> and <code>GOTO MARKER</code> were both valid. Zgrass also included nameless branches, using the <code>SKIP</code> instruction, which would move forward or back a given number of lines.
 
In keeping with its original purpose as a graphics language, Zgrass included numerous commands for simple drawing. Zgrass's coordinate system had one point for each pixel in the high-resolution mode of Nutting's graphics chip, giving a 320&times;202 grid. The Astrocade, by design, could only use that chip's low-resolution mode, a 160&times;101 display. To avoid potential mapping problems, the coordinate space's zero point was placed in the center of the screen. &minus;160 to 160 were valid X locations, and -101 to 101 valid Y locations. For use on the Astrocade you used the positive locations only, whereas on the UV-1 the entire space was available.