Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
doc: add OUT documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
boriel committed Dec 30, 2022
1 parent 8119661 commit 36c2607
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/out.md
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)

0 comments on commit 36c2607

Please sign in to comment.