M68K Trap Tasks

Calling trap #15

The 68000 instruction set includes trap #n, which transfers control to an exception handler. This editor uses trap #15 for the tasks on this page: put the task number in D0.B, put its arguments in the listed input registers, then read any answer from the output registers. Other trap numbers are not implemented here.

The simulator supplies these tasks for the console, screen, keyboard, mouse, clock, project files, and sound. Undo reverses a task's changes along with the instruction's register and memory changes, the text it printed included; a read that is undone asks for its input again when you step it. Testcases use scripted input and their own copy of the project's files.

Input routing

Interactive reads (tasks 2, 4, 5, and 18) start in the console. Any of these operations switches them to the focused screen panel for the rest of the run:

  • Setting or reading the text cursor, or clearing the screen (task 11).
  • Resizing or querying the screen (task 33).
  • Drawing, configuring, or querying graphics (tasks 80–96).
  • Polling the keyboard or reading key or mouse state (tasks 7, 19, and 61).

There is no task to switch back. Click the screen panel before typing. Its focus ring indicates that editor keyboard shortcuts are paused while the program receives keys. Printing text alone leaves input in the console. Testcases continue to read scripted input.

Text I/O

tasks 0 to 20

Printed text is appended to the console transcript and drawn on the screen at the text cursor. Testcases compare the transcript. Typed input is echoed to both unless task 12 turns echo off. Text uses Windows-1252, a single-byte encoding: each character takes one byte, including € ($80) and curly quotes. The screen uses fixed 8 by 16 pixel cells and draws ASCII glyphs only; other Windows-1252 characters appear in the transcript but leave blank screen cells.

Display string with CR, LF

D0.B = 0

Displays D1.W characters of the string at (A1), at most 255, stopping early at a NUL, then a new line. See task 13 for the NUL terminated form.

In
A1 = string address, D1.W = length

Display string

D0.B = 1

Displays D1.W characters of the string at (A1), at most 255, stopping early at a NUL, without a new line. See task 14 for the NUL terminated form.

In
A1 = string address, D1.W = length

Read string

D0.B = 2

Reads a line ended with Enter from the current input source; a testcase supplies its next scripted input. Stores the first 79 characters followed by a NUL (zero byte), dropping any additional characters. Text is converted to Windows-1252; a character it cannot represent is stored as ?.

In
A1 = buffer address
Out
The NUL terminated string at (A1), D1.L = its length

Display signed number

D0.B = 3

Displays D1.L in decimal, in the smallest field it fits. See tasks 15 and 20.

In
D1.L = number

Read number

D0.B = 4

Reads a line ended with Enter from the current input source, keeping its first 79 characters and dropping the rest. Skips leading whitespace, reads an optional sign, then takes decimal digits up to the first other character. 12abc is 12, and a line with no number, an empty one included, is 0, never an error.

Out
D1.L = number
Note
A number too long for 32 bits keeps its low 32 bits.

Read character

D0.B = 5

Reads one key from the current input source as soon as it is typed, without waiting for Enter. Enter is $0D. Check task 7 first to poll instead of waiting.

Out
D1.B = the character, $0D for Enter

Display character

D0.B = 6

Displays one character.

In
D1.B = ASCII code

Terminate

D0.B = 9

Ends the program.

Set or get the text cursor, or clear the screen

D0.B = 11

The text cursor is where printed text lands, in character cells counted from the top left. Clearing with $FF00 clears text and graphics together, since they share one image, and homes the cursor. Positions outside the screen are clamped to it. All three operations select screen input.

In
D1.W = $FF00 to clear, $00FF to get, otherwise column in the high byte and row in the low byte
Out
For $00FF, D1.W = column in the high byte, row in the low byte

Keyboard echo

D0.B = 12

Whether input read by tasks 2, 4, 5 and 18 is echoed in the console and on the screen. With echo off, a line read still moves to a new line when Enter ends it, and a key read shows nothing. Echo is on when a program starts, and Undo restores the previous setting.

In
D1.B = 0 to turn the echo off, anything else to turn it on

Display NUL terminated string with CR, LF

D0.B = 13

Displays the NUL terminated string at (A1), then a new line.

In
A1 = string address

Display NUL terminated string

D0.B = 14

Displays the NUL terminated string at (A1) without a new line.

In
A1 = string address

Display unsigned number in a base

D0.B = 15

Displays D1.L as an unsigned number in the base in D2.B, using upper case digits past 9: 255 in base 16 is FF.

In
D1.L = number, D2.B = base (2 to 36)
Note
A base outside 2 to 36 stops the program with an error naming D2.B.

Input prompt and line feed

D0.B = 16

Controls the prompt shown while input is waiting and whether a key read of Enter adds a line feed. The waiting prompt appears as a caret and question in the console; the screen does not draw a flashing cursor. Without the line feed, Enter takes the screen text cursor back to the start of its line. Line and number reads always start a new line when Enter ends them, even with echo or line-feed settings off. Both settings are on when a program starts, and Undo restores the previous setting.

In
D1.B = 0 to hide the input prompt, 1 to show it, 2 to turn the line feed after Enter off, 3 to turn it on
Note
Any other D1.B value stops the program with an error naming the value.

Display string and number

D0.B = 17

Task 14 then task 3: the NUL terminated string, then the signed number.

In
A1 = string address, D1.L = number

Display string and read number

D0.B = 18

Task 14 then task 4: the NUL terminated string as a prompt, then a number from the current input source. The input limit and parsing rules of task 4 apply.

In
A1 = string address
Out
D1.L = number

Display signed number in a field

D0.B = 20

Task 3 right justified in a field D2.B columns wide. D2.B is signed, and a negative width left justifies the number in a field that wide instead. A number too long for the field is displayed in full.

In
D1.L = number, D2.B = field width

Graphics

tasks 33 to 96

The origin is the top left, coordinates are signed pixels, and drawing outside the screen is clipped. Colors are $00BBGGRR longs. Rectangles and ellipses exclude their right and bottom edges. These tasks select screen input, except for task 33’s windowed and full-screen requests.

Colors

A color is a long written $00BBGGRR: blue in bits 23-16, green in bits 15-8 and red in bits 7-0. The color names shown here are also available as equates to use in assembly programs.

  • black $00000000
  • maroon $00000080
  • green $00008000
  • olive $00008080
  • navy $00800000
  • purple $00800080
  • teal $00808000
  • gray $00808080
  • red $000000FF
  • lime $0000FF00
  • yellow $0000FFFF
  • blue $00FF0000
  • fuchsia $00FF00FF
  • aqua $00FFFF00
  • ltgray $00C0C0C0
  • white $00FFFFFF

Pictures in Files

A program can draw a picture it reads from a File of the project, such as a sprite sheet. Open a BMP File and choose Pixels under the editor to draw in it, or make one with New picture in the Explorer. A new picture is 32-bit and stored top-down: the pixel at column x and row y is the long at pixels + 4 × (y × width + x). The 68000 reads that long as $BBGGRR00, so lsr.l #8 turns it into a pen color, $00BBGGRR. Read the File into memory with the file tasks; its pixels start at the offset held in its bytes 10 to 13, stored least significant byte first, which is 54 in the 32-bit picture New picture makes unless told otherwise.

Each stroke updates the picture in your project when you release the mouse button or lift your finger. With autosave on, the change is saved immediately. With autosave off, save the project manually to keep your changes. Use Undo in the Pixel editor to undo a stroke. The program reads the picture as you last drew it at its next run.

Set or get the screen size

D0.B = 33

Resizes the screen and clears it. The minimum is 640 by 480, which is also the size a program starts with. Windowed and full-screen requests are accepted and ignored because the screen is an editor panel.

In
D1.L = width in the high word and height in the low word, or 0 to get, 1 for windowed, 2 for full screen
Out
For D1.L = 0, D1.L = width in the high word, height in the low word

Set pen color

D0.B = 80

The color lines, outlines, pixels and text are drawn in.

In
D1.L = color as $00BBGGRR

Set fill color

D0.B = 81

The color the insides of rectangles and ellipses and a flood fill are drawn in.

In
D1.L = color as $00BBGGRR

Draw pixel

D0.B = 82

One pixel in the pen color. The pen width does not apply and the drawing point does not move.

In
D1.W = X, D2.W = Y

Get pixel color

D0.B = 83

Reads the pixel of the image being drawn on, which with double buffering is the off screen one. Outside the screen it answers with the background color.

In
D1.W = X, D2.W = Y
Out
D0.L = color as $00BBGGRR

Draw line

D0.B = 84

A line in the pen color, leaving the drawing point at X2, Y2.

In
D1.W = X1, D2.W = Y1, D3.W = X2, D4.W = Y2

Draw line to

D0.B = 85

A line in the pen color from the drawing point to X, Y, which becomes the new drawing point: a polyline is one task per point.

In
D1.W = X, D2.W = Y

Move to

D0.B = 86

Moves the drawing point without drawing.

In
D1.W = X, D2.W = Y

Draw rectangle

D0.B = 87

Filled with the fill color and outlined with the pen. The right and bottom edges are excluded, so a rectangle whose edges meet draws nothing.

In
D1.W = left X, D2.W = upper Y, D3.W = right X, D4.W = lower Y

Draw ellipse

D0.B = 88

The ellipse inscribed in that rectangle, filled with the fill color and outlined with the pen. A square bounding rectangle draws a circle.

In
D1.W = left X, D2.W = upper Y, D3.W = right X, D4.W = lower Y

Flood fill

D0.B = 89

Spreads the fill color from X, Y over every neighbouring pixel of the color that was there, four ways.

In
D1.W = X, D2.W = Y

Draw unfilled rectangle

D0.B = 90

The outline of task 87 in the pen color, with nothing inside.

In
D1.W = left X, D2.W = upper Y, D3.W = right X, D4.W = lower Y

Draw unfilled ellipse

D0.B = 91

The outline of task 88 in the pen color, with nothing inside.

In
D1.W = left X, D2.W = upper Y, D3.W = right X, D4.W = lower Y

Set drawing mode

D0.B = 92

Mode 4 draws normally and is the default; mode 2 moves the drawing point without changing any pixel; mode 16 turns double buffering off and mode 17 turns it on, so drawing goes to an off screen image until task 94 shows it.

In
D1.B = 2, 4, 16 or 17
Note
Bitwise modes (0, 1, 3 and 5 to 15) stop the program with an error naming the mode. Double buffering is available for drawing animated sprites.

Set pen width

D0.B = 93

The width of lines and of the outlines of rectangles and ellipses. A single pixel (task 82) ignores it.

In
D1.B = width in pixels

Repaint the screen

D0.B = 94

Shows the off screen image drawn under mode 17. With double buffering off it does nothing but ask for a repaint.

Draw text at a pixel position

D0.B = 95

Draws the string in the pen color with its top left corner at X, Y, over whatever is already there, so a label can sit on a drawing. Control characters are ignored. The encoding and fixed font described under Text I/O apply. Text printed with the text tasks lands at the text cursor instead (task 11).

In
A1 = NUL terminated string, D1.W = X, D2.W = Y

Get the drawing point

D0.B = 96

Where the next line-to would start.

Out
D1.W = X, D2.W = Y

Keyboard and mouse

tasks 7 to 61

Keyboard and mouse state is polled from the focused screen; there are no input interrupts, so tasks 60 and 62 are unsupported. Tasks 7, 19, and 61 also select screen input for subsequent interactive reads.

Key codes

  • A letter key is the ASCII code of its capital, so A is $41 and Z is $5A. Shift, Alt and Ctrl do not change it.
  • A top row digit is its ASCII code, so 0 is $30 and 9 is $39.
  • The function keys are contiguous from F1, so F1 is $70 and F12 is $7B.
  • The keypad digits with Num Lock on are contiguous from $60.
KeyCode
Backspace$08
Tab$09
Enter$0D
Shift$10
Ctrl$11
Alt$12
Caps Lock$14
Esc$1B
Space$20
Page Up$21
Page Down$22
End$23
Home$24
Left arrow$25
Up arrow$26
Right arrow$27
Down arrow$28
Insert$2D
Delete$2E
Semicolon$BA
Equals$BB
Comma$BC
Minus$BD
Period$BE
Slash$BF
Backquote$C0
Open bracket$DB
Backslash$DC
Close bracket$DD
Quote$DE

Check for keyboard input

D0.B = 7

Selects screen input and polls without consuming anything: the character it reports is the one task 5 or task 2 reads next. A testcase reports its remaining scripted input the same way.

Out
D1.B = 1 when a character is waiting, 0 otherwise

Get key state

D0.B = 19

Reads whether up to four keys are held right now, one byte of the answer per key code in the same order; with D1.L = 0 it answers with the last key released and the last key pressed instead. A key held down is reported at least once however briefly it was tapped, so a polling loop never misses one.

In
D1.L = four key codes, or 0 for the last keys
Out
D1.L = four $FF/$00 bytes, or the last key up in the high word and the last key down in the low word

Enable or disable the simulator shortcut keys

D0.B = 24

Accepted and ignored: the screen panel already hands every key it takes to the program, so there are no simulator shortcuts to give up.

In
D1.L = 0 to enable, 1 to disable

Read the mouse

D0.B = 61

The pointer position is in screen pixels with the same origin drawing uses, whatever the panel’s zoom. The release and press states persist until the next one, so a program that polls slowly still sees every click; the double bit is only ever set on a press.

In
D1.B = 0 for the current state, 1 for the last button release, 2 for the last button press
Out
D0.B = Ctrl, Alt, Shift, Double, Middle, Right, Left from bit 6 down; D1.L = Y in the high word, X in the low word

Program time

tasks 8 to 23

Reading the clock and delaying execution. Both tasks count in hundredths of a second.

Get time

D0.B = 8

Returns hundredths of a second since local midnight. The value wraps at midnight.

Out
D1.L = hundredths of a second
Note
A testcase uses a virtual clock starting at 2000-01-01 midnight UTC. Task 23 advances that clock.

Delay

D0.B = 23

Lets D1.L hundredths of a second of program time pass. The editor stays responsive throughout, and the screen is repainted, so this is how an animation paces itself.

In
D1.L = hundredths of a second
Note
A testcase runs on a virtual clock: the delay completes immediately and advances that clock instead of waiting.

Files

tasks 50 to 59

Reading and writing the Project’s Files. A path is a NUL-terminated string (ended by a zero byte) of at most 255 characters, relative to the Project root, with / or \ between its parts. At most eight files are open at once, numbered 0 to 7, and D0.W reports the result: 0 success, 1 end of file, 2 error, 3 read only. A reported file error leaves execution running. Undo restores changes made by a file task, and each testcase works on its own copy of the Files.

Close all files

D0.B = 50

Closes every file the program has open.

Out
D0.W = 0

Open an existing file

D0.B = 51

Opens the existing File at the path at its start. D0.W is 0 when it opens for reading and writing, or 3 when it opens for reading only. A path with no File, a Directory, or a ninth open file is an error.

In
A1 = NUL terminated path
Out
D1.L = file number, or -1; D0.W = 0, 3 when it opened for reading only, 2 when it did not open

Open a new file

D0.B = 52

Creates the File at the path, or empties the one that is there, and opens it for reading and writing. The Directories on its path are created with it.

In
A1 = NUL terminated path
Out
D1.L = file number, or -1; D0.W = 0, or 2 when it did not open

Read a file

D0.B = 53

Reads up to D2.L bytes from the file’s position into the buffer, and moves the position past them. Fewer bytes than asked for is a success, with their count in D2.L; none at all is the end of the file, which leaves D2.L as it was.

In
D1.L = file number, A1 = buffer address, D2.L = byte count
Out
D2.L = bytes read; D0.W = 0, 1 at the end of the file, 2 on an error
Note
A read of no bytes, D2.L = 0, reports 2, including when an earlier read reached the end of the file.

Write a file

D0.B = 54

Writes the D2.L bytes at (A1) at the file’s position, growing the File as needed, and moves the position past them. A write of no bytes, and one to a file opened for reading only, report 2.

In
D1.L = file number, A1 = buffer address, D2.L = byte count
Out
D0.W = 0, or 2 on an error

Position a file

D0.B = 55

Moves the file’s position to D2.L bytes from its start. A position past the end reads as the end of the file until a write there fills the gap with zeros; a negative one is an error.

In
D1.L = file number, D2.L = position
Out
D0.W = 0, or 2 on an error

Close a file

D0.B = 56

Closes the file, so that its number can be given to the next one opened.

In
D1.L = file number
Out
D0.W = 0, or 2 when it was not open

Delete a file

D0.B = 57

Removes the File at the path from the Project. A file the program still has open stays readable and writable through its number until it is closed.

In
A1 = NUL terminated path
Out
D0.W = 0, or 2 when there is no File there

File dialog

D0.B = 58

Asks for the path of a File, for the program to open with task 51 or create with task 52. Cancel, or an empty answer, leaves (A3) alone and puts 0 in D1.L. A testcase answers it with its next scripted input.

In
D1.L = 0 to open, 1 to save; A1 = title, A2 = filter, either 0 for none; A3 = a 256 byte buffer
Out
The path chosen at (A3), NULs to 256 bytes; D1.L = 1, or 0 when the dialog was cancelled; D0.W = 0, or 2 when the buffer runs past the end of memory
Note
Shows a text prompt naming the title and asking for a path from the Project root. A D1.L other than 0 or 1 stops the program with an error naming the value.

Check that a file exists

D0.B = 59

Whether there is a File at the path. A Directory is not one, so it answers 2.

In
A1 = NUL terminated path
Out
D0.W = 0 when the File can be written, 3 when it can only be read, 2 when there is none

Sound

tasks 70 to 77

Play sound files from the project using two separate players.

The standard player (tasks 70, 71, 72 and 76) plays one WAV file at a time. While it is busy, another play request returns 0 in D0.W. The DirectX player (tasks 73, 74, 75 and 77) mixes WAV and MIDI files; this is an EASy68K-compatible interface supplied by the editor, with no Windows or DirectX installation required.

Each player has its own 256 slots, numbered by D1.B. Loading a file into a slot makes it available for later playback on that player. Paths follow the file-task rules and are relative to the project root.

A .wav extension alone does not guarantee compatibility: the audio samples stored in the file must use a supported encoding, either 8-, 16-, 24-, or 32-bit integer PCM, or 32-bit floating point. These are different ways of storing each sample as a number. The Log identifies missing or unplayable files.

Testcases are silent and have no active playback, so the standard player is never busy; file and slot results are otherwise unchanged. Undo stops sounds started by the task and restores slots it changed. Sound in this editor lists the differences from EASy68K.

Sound in this editor

After a program requests sound, the Sound button appears in the execution dock as a mute/unmute control. It sets Play sound in Preferences, where Sound volume is also available. Both settings apply across projects. Muting leaves program-visible timing and results unchanged.

The DirectX player is the name of an EASy68K-compatible interface in this editor; it does not require Windows or a DirectX installation. It mixes WAV audio files and MIDI files, which describe notes and instruments to play.

For programmable waveforms and sample playback, this editor adds the Synth, a sound chip whose registers are memory at $E00100. EASy68K does not have it.

Sound differs from EASy68K in these ways:

  • At most 64 sounds play at once, including at most 4 MIDI files. Starting another stops the oldest sound that is not looping, or the oldest loop if every sound loops. A fifth MIDI file stops the oldest MIDI file using the same rule. These limits do not change the task results.
  • MIDI files use the editor's General MIDI sound bank, its collection of instrument sounds. They can sound different from EASy68K, which uses the Windows synthesizer. The browser loads the bank automatically on the first note or MIDI-file request after opening or reloading the editor page; that request waits for loading. Later runs and projects share the loaded bank.
  • Loops stop when the program ends; EASy68K keeps them playing until another program is loaded. Sounds played once finish even after the program ends.
  • Task 77 with control 3 stops every DirectX sound even if its supplied slot is empty. EASy68K stops nothing in that case. Both return 0 in D0.W for the empty slot.
  • DirectMusic segment files are unsupported: tasks 73 and 74 return 0, and the Log explains why.

Play a sound file

D0.B = 70

Plays the WAV file at the path once on the standard player. If it is busy, nothing starts and D0.W is 0; a program that needs playback must try again later. A missing path leaves D0 unchanged, so checking only for zero does not detect every failure.

In
A1 = NUL terminated path
Out
D0.W = 1 if the play request succeeds; 0 if the player is busy or the file exists but cannot be played. If the path does not exist, D0 is unchanged.

Load a sound file

D0.B = 71

Loads the file into a standard-player slot for task 72 or 76, and returns no value. An existing but unplayable file is stored anyway; playing that slot returns 0. If the path does not exist, the slot is unchanged.

In
A1 = NUL terminated path, D1.B = slot

Play a loaded sound

D0.B = 72

Plays the file loaded by task 71 once on the standard player. An empty slot leaves D0 unchanged, so checking only for zero does not detect every failure.

In
D1.B = slot
Out
D0.W = 1 if the play request succeeds; 0 if the player is busy or the loaded file cannot be played. If the slot is empty, D0 is unchanged.

Play a sound file with DirectX

D0.B = 73

Plays the WAV or MIDI file once on the DirectX player, mixed with any other sounds already playing.

In
A1 = NUL terminated path
Out
D0.W = 1 if the play request succeeds; 0 if the path does not exist or the file cannot be played
Note
MIDI files can sound different from EASy68K because the editor uses its own instrument sound bank instead of the Windows synthesizer. DirectMusic segment files cannot be played.

Load a sound file with DirectX

D0.B = 74

Loads the WAV or MIDI file into a DirectX-player slot for task 75 or 77. An existing but unplayable file empties the slot. If the path does not exist, the slot is unchanged.

In
A1 = NUL terminated path, D1.B = slot
Out
D0.W = 1 if the file is loaded; 0 if the path does not exist or the file cannot be played

Play a loaded DirectX sound

D0.B = 75

Plays the file loaded by task 74 once, mixed with any other sounds already playing.

In
D1.B = slot
Out
D0.W = 1 if the play request succeeds; 0 if the slot is empty

Control the sound player

D0.B = 76

Controls the standard player using a slot loaded by task 71. Controls 0 and 1 play once or loop; they cannot start playback while the player is busy.

Control 2 stops the player only if the supplied slot is nonempty and is the last nonempty slot requested by task 72 or by control 0 or 1 of task 76. That slot selection changes even if the play request fails or the player is busy, so it can differ from the slot actually playing. Control 3 stops the player regardless of the supplied slot. A loop continues until stopped or the program ends.

In
D1.B = slot, D2.L = 0 to play once, 1 to loop, 2 to stop, 3 to stop all
Out
D0.W: control 0 or 1 returns 1 if playback starts, or 0 for an empty slot, unplayable file, or busy player; control 2 returns 1 for the last nonempty slot requested by task 72 or task 76 control 0/1, even if that request failed or playback has ended, or 0 otherwise; control 3 always returns 1. Other controls return 0.
Note
Loops stop when the program ends; EASy68K keeps them playing until another program is loaded.

Control the DirectX sound player

D0.B = 77

Controls the DirectX player using a slot loaded by task 74. Controls 0 and 1 play once or loop, mixed with any other sounds already playing. Control 2 stops every sound started from the supplied nonempty slot. Control 3 stops every DirectX sound, including sounds started directly from a file by task 73. A loop continues until stopped or the program ends.

In
D1.B = slot, D2.L = 0 to play once, 1 to loop, 2 to stop, 3 to stop all
Out
D0.W: controls 0, 1 and 2 return 1 for a nonempty slot, or 0 for an empty slot; control 2 returns 1 even if no sound from that slot is playing. Control 3 stops all DirectX sounds and returns 1 for a nonempty supplied slot, or 0 for an empty slot. Other controls return 0.
Note
Control 3 stops every DirectX sound even if the supplied slot is empty; EASy68K stops nothing in that case. Both return 0 in D0.W for the empty slot. Loops stop when the program ends; EASy68K keeps them playing until another program is loaded.

Unsupported tasks

Each task listed here stops the program with an error naming the task and the unsupported operation. Supported task entries identify any invalid arguments that stop execution; recoverable errors are reported through their output registers.

  • 10 print to the printer — the editor has no printer
  • 21 font properties — the screen draws text in one fixed cell font
  • 22 read a character from the text screen, 25 scroll a text rectangle — the screen holds pixels, not a grid of characters
  • 30 clear the cycle counter, 31 read the cycle counter — instruction timing is not modeled, so these tasks cannot report a 68000 cycle count
  • 32 hardware and simulator control — there is no hardware window and no automatic IRQ
  • 40 initialize a serial port, 41 set the serial port parameters, 42 read a string from a serial port, 43 send a string to a serial port — no serial device is available to a program
  • 60 enable the mouse IRQ — mouse input is polled with task 61, not delivered as an interrupt
  • 62 enable the keyboard IRQ — keyboard input is polled with tasks 7 and 19, not delivered as an interrupt
  • 100 create a network client, 101 create a network server, 102 send over the network, 103 receive from the network, 104 close a network connection, 105 get the local IP address, 106 send on a network port, 107 receive data and its port — programs in this editor cannot open network connections