mos-alloc

Allocator for mos-unknown-none target (https://github.com/mrk-its/rust/tree/mos_target) and number of utilities for setting max heap size / checking free / used memory

API Docs

https://docs.rs/a800xl-utils

Example

Full source code in examples/heap.rs.

``` rust

![no_std]

![feature(start)]

![feature(defaultallocerror_handler)]

extern crate alloc; extern crate mos_alloc;

use alloc::{string::String, vec::Vec};

// ..

[start]

fn main(_argc: isize, _argv: *const *const u8) -> isize { // .. let text = String::from("foo"); let data = (0..u16).collect::>(); /// }

```

Running examples

The easiest way is to use provided devcontainer.json configuration for vscode:

  1. Configure Visual Studio Code with Remote - Containers extension
  2. Open this project inside devcontainer
  3. on terminal run: cargo build --example kbdinfo --release
  4. resulting atari executable (xex) is target/mos-a800xl-none/release/examples/kbdinfo

License

All source code (including code snippets) is licensed under either of

at your option.