Cached at:
07/06/26, 11:07 PM
# m pc
Source: [https://wiki.xxiivv.com/site/m_pc.html](https://wiki.xxiivv.com/site/m_pc.html)
M/PC is a[concatenative](https://wiki.xxiivv.com/site/concatenative.html)operating system for[Varvara](https://wiki.xxiivv.com/site/varvara.html), inspired by[Openfirmware](https://en.wikipedia.org/wiki/Open_Firmware), designed to manage files on system without a file browser\. It uses the postfix notation, meaning that the function success their operands:
```
( Get the number of bytes in folder/file_name )
folder/ file_name cat len dec
```
Files can store reusable sequences of commands, the tilde prefix includes the content of the file:
```
( Content of ./show-slide )
slide_ swp cat 3cx22.icn cat 1 icn
```
```
1 ~show-slide
```
The interface uses a single prompt at the top of the screen to input commands:
### Controls
The operating system can be used largely without a keyboard to navigate folders and launch roms:
- left/rightNavigate Stack
- up/downScroll Stack
- AEvaluate Selected Symbol
- BDirectory/Back
### Kiosk
To start M/PC as a BIOS rom so that when the user pressesF4, Varvara returns to the BIOS instead of triggering a reboot, launch with arguments:
```
uxnemu m_pc.rom orca.rom run
```
### Wallpaper
On boot, M/PC will try and draw an[ICN file](https://wiki.xxiivv.com/site/icn_format.html)named wallpaperWWxHH\.icn, whereWWis the width of the screen divided by 8 in hexadecimal, andHHthe height\.
### Reference
Here is the list of all primitives:
```
dir ( -- [f] )
Put the file names in the current location on the stack.
mov ( path -- [f] )
Move the current location to current/path, then do dir.
now ( -- date time )
Puts the date Tue, 23 Jun 2026, and time 11:48:45 on the stack.
run ( f.rom -- ok )
Run the rom file, return with F4.
icn ( f.icn blend -- ok )
Draw an icn file with blend.
txt ( f.txt line -- ok )
Read a text file starting at line.
len ( f -- hex )
Put the length of a file in hexadecimal.
put ( body f -- ok )
Create a file with the content of body.
get ( f -- body )
Put the content of a file on the stack.
cpy ( fsrc fdst -- ok )
Copy the content of fsrc into fdst.
era ( f -- ok )
Erase file.
ren ( fsrc fdst -- ok )
Rename file fsrc into fdst.
pop ( a -- )
Pop symbol at the top of the stack.
dup ( a -- a a )
Duplication symbol at the top of the stack.
ovr ( a b -- a b a )
Copy second symbol to the top of the stack.
swp ( a b -- b a )
Pull the second symbol to top.
rot ( a b c -- b c a )
Pull the third symbol to top.
add ( a b -- a+b )
Push the sum of two symbols.
sub ( a b -- a-b )
Push the difference of two symbols.
dec ( hex -- dec )
Convert hexadecimal number to decimal.
hex ( dec -- hex )
Convert decimal number to hexadecimal.
cat ( a b -- ab )
Concatenate two symbols.
cmp ( a b -- bool )
Compare the names of two symbols.
and ( a b -- bool )
Put true if both symbols are true.
ora ( a b -- bool )
Put true if either symbol is true.
rsz ( width height -- )
Resize the screen, puts true if resize is supported by Screen.
out ( a -- )
Output symbol to Console/write.
bye ( -- )
Quit.
```
- [Source](https://wiki.xxiivv.com/etc/m_pc.tal.txt), Latest
- [Repository](https://git.sr.ht/~rabbits/m_pc)
- **Support:**[Manifest](https://wiki.xxiivv.com/site/manifest.html)[Theme](https://wiki.xxiivv.com/site/theme.html)[Snarf](https://wiki.xxiivv.com/site/snarf.html)
**incoming:**[2026](https://wiki.xxiivv.com/site/2026.html)