Update README.md

This commit is contained in:
2025-10-13 15:48:26 +02:00
parent aeee8131e7
commit 0e18958341

View File

@@ -58,6 +58,58 @@ The _r_, _j_ and _i_ commands display the value of the AX register after returni
See example in _hello.com_
## Examples
### Launching mushroom client
```
s 200
l mushroom.com
r
```
### FTP a file and store it to the floppy disk
```
s 200
l ftpget.com
```
* switch to segment _0x200_
* load file _ftpget.com_ to _cur-seg:0100_
Here you need to run this on the host:
```
python ftpserve.py src/hello.com
```
Then on polOS:
```
r f000 200
s 0
6000
w 48454c4c4f202020434f4d
i 0800 6000 f000 200
```
* run previously loaded `ftpget.com`: store up to _0x200_ (512) bytes to address _0000:f000_
* set _cur-seg_ to _0x0000_
* set _cur-add_ to _0x6000_
* write file name in ascii: `HELLO COM` to _0000:6000_
* call int 0x80 0x08 (writefile) with args: _fname_, _addr_, _size_
We can now test that the program got transferred correctly:
```
s 300
l hello.com
r
```
### But where is my `ls` command?
You can just inspect memory at _0000:1c00_, that's the root directory. Each entry is _0x20_ (32) bytes long and starts with 11 characters that constitute the file name.
## Useful stuff
* [Colab](https://colab.research.google.com/drive/1xGKYQJLKyabcSNYOiPumf9_-bbCbXke1?usp=sharing)