Search
45 results for “grz0zrg”
-
Added short form syntax (shift is now optional) and ADR pseudo instruction (at last) to my #arm #forth assembler, mostly convenience stuff to avoid verbosity / manual compute of PC relative address, also changed labels word to -> and <- (--> for ADR labels), ADR implementation use a single pass back-patching algorithm that build a linked list until --> word is hit (will resolve each ADR), could be done more generically as well (for branch) but will skip it for now. Time to code some RO stuff !
-
Added short form syntax (shift is now optional) and ADR pseudo instruction (at last) to my #arm #forth assembler, mostly convenience stuff to avoid verbosity / manual compute of PC relative address, also changed labels word to -> and <- (--> for ADR labels), ADR implementation use a single pass back-patching algorithm that build a linked list until --> word is hit (will resolve each ADR), could be done more generically as well (for branch) but will skip it for now. Time to code some RO stuff !
-
Added short form syntax (shift is now optional) and ADR pseudo instruction (at last) to my #arm #forth assembler, mostly convenience stuff to avoid verbosity / manual compute of PC relative address, also changed labels word to -> and <- (--> for ADR labels), ADR implementation use a single pass back-patching algorithm that build a linked list until --> word is hit (will resolve each ADR), could be done more generically as well (for branch) but will skip it for now. Time to code some RO stuff !
-
Added short form syntax (shift is now optional) and ADR pseudo instruction (at last) to my #arm #forth assembler, mostly convenience stuff to avoid verbosity / manual compute of PC relative address, also changed labels word to -> and <- (--> for ADR labels), ADR implementation use a single pass back-patching algorithm that build a linked list until --> word is hit (will resolve each ADR), could be done more generically as well (for branch) but will skip it for now. Time to code some RO stuff !
-
Notes about this :
1. Most of the syntactic addition obviously serves as visual cues and the syntactic rules are NOT enforced, still okay for a small language with few users focus, there is great Forth-like high level language like #factor anyway for a more professional role
2. '}' serve as termination for 'if' 'for', may only work in some implementation where the scope is known, also didn't close the definition with ';' or '}' on two last ones, a mistake -
Some HAKMEM 149 based randomised #circlepacking algorithm i am tinkering on, the algorithm is used to draw the circles (and fill them) but also to select a random point inside the root circle by reusing the HAKMEM circle fill by messing with the orbit a bit (it spiral inward), this makes the code rather tiny !
Inspiration came from https://rantonse.org/art/randomized-circle-packing
-
Made a #forth ARMv2 (macro) assembler (tested with #gforth) and took the opportunity to revamp my light #ARM Forth a bit by adding useful words with some light changes :
https://github.com/grz0zrg/ARM-ForthLite/blob/main/examples/ARMv2_assembler.fs
The goal was to have one mnemonic = one word so 90% of the source is a lot of repetition but it looks close to the conventional syntax. (In a postfix way)
Does not require much primitives.
Wrote a small write-up : https://www.onirom.fr/wiki/blog/20-12-2025_writing_an_armv2_assembler_in_forth/
-
A tiny way to compute a square / triangle wave at the same time without conditionals, only basic arithmetic and shifts.
This can be used for #oscillators or animations etc. #algorithm is a variant of HAKMEM 149.
Can also be used to draw a square. (And other shapes, see previous toot)
Code also shows how to draw a diamond shape by rotating the square by 45°.
There are two versions, optimized for size and optimized for speed.
#computergraphics #p5js #softwarerendering #codegolf #sizecoding
-
A very simple way to draw HAKMEM 149 based structures by using whole 32 bits range with upper bits as coordinates using unsigned shifts.
This also works with a lower range but it loses precision.
The oblique version is even simpler by removing the last two operations.
The structure looks like Apollonian net or Hopalong attractors.
This drawing method also works with other attractors or Gingerbread man map etc.
#sizecoding #codegolfing #algorithm #attractor #fractal #computergraphics
-
Wrote some more about extending the "HAKMEM 149 line algorithm" to a quad rasterizer to be able to draw billboards (sprites) up to 3D sprites, the HAKMEM approach (and forward mapping) lose a bit of interest when degrees of freedom (and projection) are added up though but it was fun to retrace the sprites history a bit. :blobcatcomfysmirk:
https://www.onirom.fr/wiki/codegolf/main/#HAKMEM_149_quad_rasterizer_/_sprite_scaler_+_rotation
-
A tiny way to draw an "isometric" (dimetric) cube in an iterative fashion with a single loop, all integers with an integer variant of HAKMEM 149 (so called Minsky circle) display hack. (Sin / Cos approximation)
Can also be used to draw a hexagon (it is a filled hexagon after all) and can easily render fractured cubes as well by varying "l" (second screenshot)
#cube #p5js #computergraphics #isometric #dimetric #hexagon #softwarerendering
-
A try at realtime graphics programming / code golfing on the #AtariST #motorola68k, also wrote a guide (may works for other models such as Falcon) : https://www.onirom.fr/wiki/codegolf/atari_st/
My first :atari: ST program was made 20 years ago but i didn't go further than some GEM "hello world" at the time... a fun and easy platform overall although i dislike bitplane graphics and the exe header. ;) (no need for header / loader on Acorn Archimedes / RISC OS !)
-
Experiment with #Cistercian numerals extended to base 16, rearranged so it map to binary, a #glyph depict 16-bit numbers with quadrants depicting nibbles (4-bit), quadrant order is untouched.
4 original Cistercian numbers are mapped on power of two :
0001 -> 1 (Cistercian representation)
0010 -> 2
0100 -> 4
1000 -> 6All nibble numbers are then defined by mixing those.
Packed all my tiny intros with these glyphs for fun, replacing stave by a dot makes cool glyphs. (and is less ambiguous)
-
"Archimedean Echoes" 256 bytes for RISC PC+ / #riscos 3MB+ for #lovebyte2025
Multilayered "Appolonian Net" with horizontal parallax scrolling, patterns are produced with the HAKMEM 149 algorithm. (All integers)
Write-up (with sources): https://www.onirom.fr/wiki/codegolf/archimedean_echoes/
-
"Bloom 612" a 256 bytes #Dreamcast procedural graphics shown at #lovebyte2025
3x additive HAKMEM 149 algorithm (all integers) progressively scaled up which render a blooming 🌺
-
"Dreamelt" 128 bytes #Dreamcast intro shown at #lovebyte2025
This uses the HAKMEM 149 algorithm, it draws with a fixed color and has a screen clearing pass that decreases the framebuffer values continually which result in colors cycling along frames.
Dreamelt write-up (with sources): https://www.onirom.fr/wiki/codegolf/dreamelt/
Also released a 64 bytes #acornarchimedes intro with the same algorithm although it doesn't have the screen clearing pass : https://www.onirom.fr/wiki/codegolf/archismall/
-
"The Cube is A Lie" 256 bytes intro (including 32b program header) for 1985 #AtariST shown at #lovebyte2025
Demonstration of an iterative way to plot a rotating wireframe cube showing two faces at most without initial data by exploiting the square <> hexagon transition of the HAKMEM 149 algorithm.
Refined version of the one in previous toot.
Full write-up: https://www.onirom.fr/wiki/codegolf/tcal/
-
Eadem Mutata Resurgo - 128 bytes procedural gfx intro for #riscos / #acornarchimedes shown at #lovebyte2025
Mode 13 256 colors on 8 MHz ARM.
96 bytes of algorithm code (24 instructions), rest is for setup.
Full write-up (with code): https://www.onirom.fr/wiki/codegolf/eadem_mutata_resurgo/
-
Tested my light #arm #forth + ARMv2 assembler on early '90s #riscos 3.1.
Added a platform-specific dump word and few convenience stuff (comment word, simple I/O sample etc.) so i can use this Forth / assembler as a standalone RISC OS program and drop BBC BASIC reliance.
Experimented with a relocatable dictionary as well, a program pre compile the Forth assembler then outputs a dict. binary, this dictionary can be loaded / included as needed, code size barely increased.
-
"Wormholes" 256 bytes intro for #riscos / #riscpc released at NOVA 2025
Write-up : https://www.onirom.fr/wiki/codegolf/wormholes/
Works on A7000, also high end Acorn Archimedes when adapted for mode 13. (320x256)
-
COSMAC VIP (RCA 1802) first try at low level coding with some HAKMEM 149 1-bit drawings (128x64), ~134 bytes program, some of it taken by the high res mode setup.
Also wrote a #cosmacvip (and related) low-level coding quick start article : https://www.onirom.fr/wiki/codegolf/cosmac_vip/
A fun computer for its simplicity and extensions / variants, Chip-8 (or Forth ?) may be cool to experiment with as well. (1802 is kinda unusual !)
The program runs fairly quickly in the emu.
-
X-87, 256b DOS (386+) VESA 2 640x400 procedural graphics shown at Outline 2026
#x86 sources : https://github.com/grz0zrg/codegolfing/tree/main/DOS/X-87
details : https://www.onirom.fr/wiki/codegolf/x-87/
Works on Bochs + Freedos. Slow render time.
Attached is a #gforth version which was used as an intermediate prototype to produce the x87 FPU code.
-
Simplified my heretic #forth by replacing (combining) parameters with variables, it is equivalent and i like variables to replace stack manipulation in non speed critical code, i dont use the Forth way there obviously as an assignment looks like >symbol_name which declare (or reuse) a symbol_name word and put whatever is on stack in the word code, calling it without > put the value back on stack. A later goal might be to switch to something tokenized like #colorforth to simplify even more.
-
One thing i didn't mention previously is stack noise which is a property of the basic #forth model which may be ugly for newcomers, can partly be solved with registers, they are named primitives generally bound to CPU registers to store transient stack data. Here is an advanced test of Forth masquerading as C by abusing an infix to postfix conversion step ( ), 'm=' is syntactic sugar; a register store call, last sample is #colorforth influenced and use a special token to mark the line as infix.
-
Experimenting with a #forth dialect currently and may post more about it, made a lightweight ~440 bytes #arm implementation (targeting Raspberry PI 0) devoid of REPL and with few primitives (idea is wrapping things around), still quite incredible how simple this programming language can be and still allow easy "high" level constructs mixed with low level ones, especially like #colorforth approach which simplify it even more, very eyes opening to me for languages design.
-
Implemented and tested "baremetal" #rpi0 storage device access (may also work for network devices) before going for a language rewrite, it use the #uboot API with calls implemented in #asm, sample was done with my custom #forth with API primitives. May release the source of all this soon along with a detailed guide of how to use the U-Boot API for #baremetal stuff at assembly level, U-Boot adds some layer BUT i quite like avoiding all the cumbersome modern low-level thingies. :blobcatcomfysmirk:
-
"Wormholes" 256 bytes intro for #riscos / #riscpc released at NOVA 2025
Write-up : https://www.onirom.fr/wiki/codegolf/wormholes/
Works on A7000, also high end Acorn Archimedes when adapted for mode 13. (320x256)
-
"Wormholes" 256 bytes intro for #riscos / #riscpc released at NOVA 2025
Write-up : https://www.onirom.fr/wiki/codegolf/wormholes/
Works on A7000, also high end Acorn Archimedes when adapted for mode 13. (320x256)
-
"Wormholes" 256 bytes intro for #riscos / #riscpc released at NOVA 2025
Write-up : https://www.onirom.fr/wiki/codegolf/wormholes/
Works on A7000, also high end Acorn Archimedes when adapted for mode 13. (320x256)
-
"Wormholes" 256 bytes intro for #riscos / #riscpc released at NOVA 2025
Write-up : https://www.onirom.fr/wiki/codegolf/wormholes/
Works on A7000, also high end Acorn Archimedes when adapted for mode 13. (320x256)