# Dusk OS changelog Because Dusk OS is designed to mainly be used after civilizational collapse, the idea of having versions for it doesn't make much sense. After all, the only version the operator will ever need is the latest she manages to have before she makes it hers. With the advent of [Usermode Dusk][usermode], there's a possibility of using Dusk as an applicative platform that could become a champion for simplicity and efficiency in the disgusting world of modern software. With some dexterity, that could be done without jeopardizing original design goals. That's an interesting prospect. [usermode]: http://duskos.org/usermode.html Targeting git commits is awkward as you're always on a moving target, so for this applicative platform to work, it's better if there's some kind of versioning in Dusk. This versioning is not what we commonly call "semantic versioning". It's a simple integer version being bumped up at semi regular intervals at moments where things are relatively stable. Something like a release per month sounds good. There's never a sub-numbered version. If a particular version turns out to have a big bug in it, we simply release a new version quickly. There is no particular effort to maintain backward compatibility of the API. We don't change it gratuitously, but we don't maintain compatibility layers either. If you look the the history of the project, you'll see that some APIs have been there for longer than others, indicating the likeliness of their future change. The changelog below isn't meant to be a mirror of the git commit. Minor bug fixing isn't indicated. The goal of this changelog is to facilitate transition of dependent code to a subsequent version. It therefore lists API addition, change and removal. A good way to know more about the context of a particular changelog entry is to use `git blame` and look the the commit that added this entry. Dusk's git commit messages often contains the context and rationale to a particular change. Each version has a tag (example `v42`) in the git repository and a tarball ([signed with PGP][ssl]) is [published on Dusk OS' website][files]. [ssl]: http://duskos.org/ssl.html [files]: http://duskos.org/files/ You might see packages with a `preXX` suffixes in them. These are "pre-release" versions and are used for development purposes. You shouldn't depend on them or, if you do, do it with the understanding that these packages will be removed shortly after the real release. ## v1 - 2024/01/03 * Initial release. ## v2 - 2024/01/25 * Remove RPi build scripts (but keep kernels). These now live in [duskos-deployments][deployments]. * [lib/bit][]: add `bitflag`. * `asm/halo`: Introducing the HAL Overdrive * Add `to&` `to|` and `to^` as well as their companion `and!` `or!` and `xor!`. * Remove DuskBSD. I hit significant roadblocks in its development and the amount work is required to make it work outweighs the value of the tool. I give up. * pc * add [drv/pc/int10h.fs], a new driver for emitting through the BIOS. * Change approach to PIC preservation during int13h/int10h calls. Instead of doing a $08/$70 <--> $20/$28 remapping on each call (very bug prone, especially if the PIT is activated), we copy entries for the IVT during setup and only map to $20/$28 once. See [doc/hw/i386/pc/kernel]. * Set the PIT on mode 2 instead of mode 0. * Make range words binary modulable, thus changing their semantics. See [doc/usage/lit]. To keep previous semantics, those changes have to be made: * `move` --> `cmove` * `fill` --> `cfill` * `[]=` --> `c[]=` * usermode: * Separate "kernel" from "payload". * Replace the `callback` struct with a `interopzone` struct which lives in Dusk's memory space. * The wrapper now has the ability to supply any payload address through boot args. * Memory size for Dusk is now dynamic, supplied through boot args. * Hand over `main()` control to Dusk packages, giving them much more flexibility. * `common_main()` has been split in two: `common_setup()` and `common_exec()`. * There are now 256 `cbfuncs` slots. * It's now possible to "freeze" executable for faster startup time. * Add `StdIO` struct to common API. [deployments]: http://duskos.org/deployments.html ## v3 - 2024/02/23 * core: * add `ll>data`. * add `cells/`. * [hal][]: * add `s>>,` operator. * `*,` is now guaranteed to preserve the S register. * [asm/dis][]: new unit * [asm/halm][]: Rename "HAL Overdrive" to "HAL Macros", along with lessened ambitions. The most ambitious ideas I had for HALO turned out to be problematic and the name "Overdrive" becomes a misnomer. It's now only a collection of useful HAL-related macros. * [comp/c][]: * Complete overhaul of the expression resolution mechanism and `CDecl` (now `CType` and `Symbol`) structure. Regressions might pop up here and there, but otherwise it's a drop-in replacement. * Typecasting is now stricter and needs to be done more explicitly. For example, if "c" is a char, "c << 8" will always yield 0. "(int)(c << 8)" needs to be typed. Comparison operators need matching types. * Allow creation of incomplete structs, thus allowing circular references in structs. * Reverse the order of arguments in calling convention. Previously, last argument was top of PS, now, first argument is top of PS. This affects only calls from C to Forth and from Forth to C. The API for a C function calling a C function stays the same. * Change semantics of `fread()` and `fwrite()` to target `IO :read` and `IO :write` rather than `IO :read#` and `IO :write#`. In effect, it transforms their `void` return type into `int` and they don't abort anymore on partial read/write. * The ">>" operator on signed integers now does an arithmetic shift right. * Add the `#const`, `#forth` and `#include` pre-processor directives. * Replace `calias` with `#calias`, `#calias16`, `#calias8` and `#caliasns`. * Change lifetime rules of types, symbols and constants. They are now entirely cleared before compiling a C unit. This brings DuskCC closer to the "traditional header #include" pattern. See commit message for rationale. * [comp/c/lib][]: * add `uint allot(uint n)` * add `uint allot0(uint n)` * add `void memcpy(void *dst, void* src, uint n)` * [comp/tok][]: Change semantics of "tonws<". When no WS char is consumed before yielding `c`, `lastws` is `LF` instead of `0`. * [lib/accel][]: Move the "Core words accelerator" part of the late `asm/halo` into a more aptly named unit. * `lib/exec`: new unit * [lib/fmt][]: add `sprintf`. * [lib/math][]: add `log2mod`. * [lib/psrs][]: new unit. * [lib/str][]: add `startswith?` and `endswith?`. * `lib/tree`: remove * `/mem`: new top level directory, with these units moved to it: * `lib/alloc` * `lib/arena` * `lib/array` * `lib/dict` * `lib/here` * `lib/ll` * `lib/malloc` * `lib/scratch` * `lib/stack` * [mem/alloc][]: add `Allocator :allot0` * `posix/fd` * Change the `DataIO` into a parametrizable `FDIO` and create a new `stdio` structbind that wraps FDs 0 and 1. * Have this new wrapper replace error (`-1`) return values from `fdread` and `fdwrite` to zero. * [mem/endian][]: new unit. * [sys/file][fs/core]: add `Path :exec<` and `exec<<`. * [sys/io][io/stream]: Change the semantics of `:read` and `:write`. To keep previous semantics, those changes have to be made: * `:read` --> `:read#` * `:write` --> `:write#` * usermode * Remove the newly added `stdio` structbind in favor of the one now included in `posix/fd` (which usermode already includes). * Expose the `wantstofreeze` global variable in `common.h`. * Have `ABORTPTR` hook to `bye` by default. This doesn't affect interactive mode, which uses `sys/rdln` which rehooks `ABORTPTR`. ## v4 - 2024/03/21 * core: add `showprogress` and `?progress>`. * [hal][]: add "field+)" * [asm/arm][] * Add a big bunch of convenience macros. * Add `mcrr)`. * [comp/c][] * Enforce strict type matching all binary operators, return statement and function call arguments. * Bring Forth's immediate superpowers to C with `#immediate`! * Perform sign extension when typecasting a signed type to a larger type. * Add `#if/#else/#endif` directives. * [comp/c/lib][] * Add `strequal()` and `assert()`. * Move formerly built-in `pspush()` and `pspop()` into stdlib. * Add immediate function `nbelem()`. * Add `DSTYPE/DPRINTF/DCPRINTF` macros. * [comp/tok][]: add `n>tok`. * [drv/rpi/break][]: new unit (and concept, see doc/break) * [drv/rpi/emmc][]: add write support * [drv/rpi/gpio][]: new unit * [drv/rpi/intr][]: new unit * [drv/rpi/pwr][]: new unit * [drv/rpi/screen][]: new unit * [drv/usb][]: port USB stack from Plan 9. * [drv/usb/kbd][]: replace old implementation with port from Plan 9. * [drv/usb/uhci][]: temporarily remove. Will soon replace with Plan 9 port. * [lib/macro][]: add the `%-` argument placeholder type. * [lib/math][] * Add `log2#`, `roundpow2`, `sex8` and `sex16`. * Add `/lib/math.h` to expose some words to C. * [mem/alloc][]: add `:alignto`, allowing allocators to align to something else than 4 bytes. ## v5 - 2024/04/10 * core: * Make `INSZ` cell into `insz` value and add `inptr` @value to `INPTR`. * Lower kernel requirements for `in<` and `word`. * Change `fstructbind` signature from `( "structname" "bindname" -- )` to `( "fieldname" "structname" "bindname" -- )`. * Make `ARCH` into an integer constant described in `doc/kernel`. * Guarantee the 3 bytes before the dictionary length field to be stable, that is, zero-padded if the name is shorter than 3 characters. * Move `alignhere` from `xcomp/boot` to kernels. * [hal][]: * add `popexit,`. * change arguments of `branch! ( tgt br -- )` to `branch! ( br tgt -- )`. * [drv/arm/exc][]: new unit. * [drv/arm/psr][]: new unit. * [drv/arm/sccp][]: new unit. * [emul/oberon][]: [new unit][dusk-oberon] by Michael Schierl. * [fs/fat][] * Merge with `fs/fatlo`, which disappears. * Move `newFAT` and related words to the new `fs/fatt`. * [fs/fatt][]: new unit. * [gr/color][]: add `rgb888>rgb565 ( n -- n )`. * [gr/plane][]: make `blt`, `bltfill` and `bltpixel` into proper methods. * [lib/arch][]: new unit. * `lib/drivelo`: merge contents with `sys/file`. * [sys/file][fs/core] * Simplify the boot process of systems involving filesystems. * Lower the API requirements for structs extending `File`. * Replace `Filesystem :iter` with a simpler `Filesystem :children`. * Replace `Path :iter` with `Path :children`. * Add `Path :bi`. * [sys/kbd][]: complete rewrite. See `doc/sys/kbd`. * `sys/ps2`: move to [drv/ps2][] and have it follow the new `sys/kbd` API. * `wasm`: Remove and put in [its own repository][dusk-wasm] * `xcomp/boot`: Move `IO` struct to `sys/io` and `File`, `Filesystem` and `FSInfo` to `sys/file`. `xcomp/boot` is now IO-less and FS-less. [dusk-wasm]: http://duskos.org/wasm.html [dusk-oberon]: http://duskos.org/oberon.html ## v6 - 2024/05/13 * big changes: * add [special treatment][usage/io] for double quotes (`"`) and mustache (`{`) in word parsing logic. This means, for example, that the string literal previously constructed as `" foobar"` is now constructed as `"foobar"`. * remove "to" semantics and replace it with [Big Moustache][lib/bm]. * remove binary width modulation in favor of moustaches. * core: * added words: * `consts` * `wordorquote` * `variable` * removed words: * all `field` words * `nscompile` * `structbind` and `fstructbind` * `rebind'` and `[rebind']` * `[rallot]` and `[rfree]` * `struct[` and `]struct` * `@@+` and `@!+` * `and!`, `or!` and `xor!` * `1+!` and `1-!` * All `to` words except the straight `to` * `'"` and `-cmove,` * add `PSSZ` sysvar and have `stack?` check for PS overflow. * move `HEREMAX` out of `SYSVARS` and into a regular cell in `xcomp/boot`. * move `scnt` and `rcnt` from [lib/diag][] to `xcomp/boot`. * add the concept of "quit hooks". See [usage/flow][]. * replace `"<` `litrepl` and `litrepl?` with `str<`. * rename `S"` to `"` and `,S"` to `,str"`. * move `STR_MAXSZ` and `strmove` from [lib/str][] to `xcomp/boot`. * replace `MAXWORDSZ` with `STR_MAXSZ`. * move endian-ness related words to [mem/endian][]. * change `echoin` and `'~` values into variables. * [hal][]: * add `ifz,` and `ifnz,` macros. * remove `[@+],`, `[!+],` and `(split`. * [comp/c][]: * macros arguments can now optionally be placed inside parentheses. * remove `CType :export`. * [drv/pc/ioport][]: * add the `p@{}` and `p!{}` moustache actions. * remove the "to-obeying" `ioport` in favor of the new moustaches. * [drv/usb][]: * Rename a few C structs and members: * `Usbdev --> IDev` * `Ep --> IEp` * `KEp --> Ep` * `Dev.usb --> Dev.info` * [fs/fatt][]: replace `fatops` structbind with `FatOpts` namespace containing moustache fields. * [lib/bm][]: new Big Moustache unit. * `lib/exec`: move contents to `xcomp/boot`. * [lib/drive][]: remove unused `DriveIO`. * [lib/macro][]: * now uses `wordorquote` for argument parsing. * rename `macro"` to `macro`. * [lib/math][]: * replace `roundpow2 ( n pow -- n )` by the more general `roundup ( n div -- n )`. * add `rounddown ( n div -- n )`. * add `abs ( n -- n )`. * [lib/memfile][fs/memfile]: new unit * [lib/psrs][]: * add `ps[] ( ... n -- ... a u )` * add `ndrop ( ... n -- )` * remove `PS1` to `PS4` in favor of their moustache counterparts. * [lib/secld][]: don't depend on the `Drive` struct. * [lib/str][]: * add `bounds[] ( a u -- lo hi )`. * rename `intersect[]` to `cintersect[]` without changing semantics. * add `swap[] ( a u -- )`. * [lib/wordtbl][]: * replace `wordtbl`, `:w` and `'w` semantics with `wordtbl[`, `]wordtbl` and `:>`. * add `lookuptbl[`, `]lookuptbl` and `?lexec`. * [sys/file][fs/core]: * remove the "path drive letter" concept. * remove the `Path` struct. * add `Filesystem finddir` and `Filesystem :exec<`. * plug `f<<` and `?f<<` on `Filesystem :exec<` thus allowing dependency declarations in units to use relative paths. * move to `Drive` struct from `xcomp/boot` to here. * remove `FSInfo` and change `Filesystem :info` semantics. * decouple `File` from `SectorWindow`. * move `SectorWindow` (back!) to [lib/drive][]. * [sys/io][io/stream]: * remove unused `SumIO` and `SerialIO`. * remove `MemIO` in favor of [lib/memfile][]. * `IO` structs are not seekable anymore, nor do they have a size. It is now a `File` property. * remove unused `IO :readall`. * [sys/kbd][]: * add `:melt ( nkc self -- nkc )` * [text/gedx][]: new unit ## v7 - Brewing... * big changes: * Add the concept of [unit][usage/unit]. * "de-namespace", that is, remove the namespaces around the structures, in the new spirit of "unit bubbling", for the following units: * [ar/tar][] * [emul/cpu][] * [emul/6502][] * [emul/virtio][] * [fs/core][] * [fs/tar][] * [fs/fat][] * [fs/fatt][] * [fs/memfile][] * [io/grid][] * [io/secwin][] * [io/stream][] * [text/ed][] * core: * add `readline<` and `readline<#` * add `[]>r` `r>[]` `str>r` `r>str` * usermode: * add the "raw" flavor * [hal][]: * add `dropf,` * [asm/armd][]: new unit * [io/drive][]: new unit with contents extracted from [fs/core][] * [lib/bm][]: * add `=` `<>` `<` `>` `<=` and `>=` actions * remove `smethod` * add `k` (keep) modifier * `lib/context`: remove. `needs` rendered it useless * [lib/drive][io/secwin]: rename to `io/secwin` * [lib/memfile][fs/memfile]: rename to `fs/memfile` * [lib/secld][io/secld]: rename to `io/secld` * [lib/str][]: * replace `rmatch` and `rfind` with `rmatch"` and `rfind"` * [mem/dict][]: * change `forget` semantics * add `unitofentry` * [sys/file][fs/core]: * rename to [fs/core][] * remove "floaded" mechanism and replace `?f<<` with `needs` * remove `file` bind * add `closeall` * remove unused `drv` and `flags` filesystem fields * replace `findfreecursor` with `?reusefile` * remove unused `newcursor` filesystem method * add `fsfindrel` * remove `curdir`, `finddir` and `fsexec` * [sys/grid][io/grid]: rename to `io/grid` * [sys/io][io/stream]: * rename to `io/stream` * add `exec1<` * change `readline` semantics to fit `readline<` * add `readline#` * [text/ed][]: * replace `edload` with `edload<<` and add `edsaveto` * add multiple buffers support * [text/help][]: new unit * [text/ts][]: new unit