This repository has been archived by the owner on May 21, 2024. It is now read-only.
forked from boriel-basic/zxbasic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# OUT | ||
|
||
|
||
## Syntax | ||
|
||
``` | ||
OUT <port number>, <value> | ||
``` | ||
|
||
|
||
## Description | ||
|
||
Sends the byte value to the given port. | ||
Arguments must be a numeric expressions. Port will be converted to `UInteger` | ||
and value will be truncated to `UByte`. | ||
|
||
## Examples | ||
|
||
``` | ||
REM Port 254 | ||
DIM i AS UInteger | ||
CLS | ||
FOR i = 1 to 10000 | ||
OUT 254, i | ||
NEXT | ||
``` | ||
|
||
|
||
## Remarks | ||
|
||
* This function is 100% Sinclair BASIC Compatible | ||
* If the given port is not of type`UInteger`, it will be [converted](cast.md) to `UInteger` before operating with it. | ||
* If the given value is not of type`Ubyte`, it will be [converted](cast.md) to `UByte` before operating with it. | ||
|
||
|
||
## See also | ||
|
||
* [IN](in.md) |