HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
openbios
openfirmware
Forth2017–2023
openbios / openfirmware

openfirmware

OpenFirmware as used on OLPC (and elsewhere)

3Distinct people
15Mentions
1Explicit recommenders
125GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

OpenFirmware as used on OLPC (and elsewhere)

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I've frequently written about Mitch Bradley's Forthmacs / Sun Forth / CForth / OpenBoot / OpenFirmware on HN. I was his summer intern at Sun in 1987, and used his Forth systems…

DonHopkins used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 2:59:53 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2017-10-13 20:46:18 UTC to 2023-12-18 22:27:33 UTC.

02462017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC606
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202

What Hacker News says

3 sources
I also love your comments, this and others! Of course OpenFirmware has some code for paging! ;) purpose: Set up page tables and turn on paging https://github.com/openbios/openfirmware/blob/master/cpu/x86... start-assembling protected-mode \ RAM is on and mem-info-pa tells the memory layout label entry \ Initialize virtual page table \ Initialize linear=physical page table (redundant page table entries) \ Enable paging (note that page fault handler is not in place yet) [ifdef] notdef \ clear page tables ax ax xor /ptab /l / # cx mov pt-pa # di mov rep ax stos [then]
In Thinking Forth (1984)
Yes indeed, but even more so: Forth is vastly more powerful than a mere macro assembler, because you have the full power of Forth to write arbitrary functions and mini-compilers to assemble code, no just simple macros! It comes with structured control flow constructs, and you can even write your own. Not only is the assembler itself written in Forth, but you can seamlessly extend and build on top of the it too, building high level interfaces and domain specific languages on top of low level assembly code and hardware. Check out the amazingly powerful x86 assembler in OpenFirmware, which is deeply integrated with the hardware, operating system, bootstrapping, debugging, tracing, breakpointing, disassembling, cross assembling, meta compiling, and calling back and forth with C code: purpose: x86 assembler https://github.com/openbios/openfirm
Read the rest
ware/tree/master/cpu/x86 purpose: From Forth, call the C subroutine whose address is on the stack https://github.com/openbios/openfirmware/blob/master/cpu/x86... purpose: Tools for creating disembodied assembly code sequences https://github.com/openbios/openfirmware/blob/master/cpu/x86... purpose: Forth access words for special 386 registers https://github.com/openbios/openfirmware/blob/master/cpu/x86... purpose: After a breakpoint, displays a backtrace of C stack frames. https://github.com/openbios/openfirmware/blob/master/cpu/x86... purpose: 386 disassembler. https://github.com/openbios/openfirmware/blob/master/cpu/x86... purpose: Access to I/O ports and physical addresses under Linux https://github.com/openbios/openfirmware/blob/master/cpu/x86... https://github.com/openbios/openfirmware/blob/master/cpu/x86... \ One of the very best features of FORTH assemblers is the ability \ to use structured conditionals instead of branching to nonsense \ labels. : IF >MARK swap long-offsets @ if dup h# eb = if drop h# e9 asm8, else prefix-0f h# 10 + asm8, then real? if 0 asm16, else 0 asm32, then else ASM8, 0 asm8, then ; : THEN >RESOLVE ; : BEGIN <MARK ; : UNTIL <RESOLVE ; : AHEAD 0EB IF ; : ELSE AHEAD BUT THEN ; : AGAIN 0EB UNTIL ; : WHILE IF BUT ; : REPEAT AGAIN THEN ; \ These conditional test words leave the opcodes of conditional \ branches to be used by the structured conditional words. \ For example, \ 5 # ECX CMP 0< IF EAX EBX ADD ELSE EAX EBX SUB THEN \ begin dx al in tbe # al and 0<> until https://github.com/openbios/openfirmware/blob/master/cpu/x86... \ Some x86 assembler macros to make it easier to write x86 early \ startup code. There are macros to set MSRs to specific values, \ to set and clear individual MSR bits, to read and write PCI \ configuration registers with the common CF8/CFC mechanism, \ and to read and write I/O ports. \ The code keeps the MSR register number in %ecx, the low 32 bits \ of the value in %eax, and the high 32 bits in %edx, consistent \ with the way the rdmsr and wrmsr machine instructions work. \ The bitset and bitclr operations work on %eax, and the -hi versions \ work on %edx. \ The I/O port operations also leave the data in %eax, so you can \ use bitset and bitclr with them too.
In Thinking Forth (1984)
DonHopkins·Nov 20, 2022Recommendation phrase
I've frequently written about Mitch Bradley's Forthmacs / Sun Forth / CForth / OpenBoot / OpenFirmware on HN. I was his summer intern at Sun in 1987, and used his Forth systems in many projects! https://github.com/openbios https://wiki.laptop.org/go/FORTH https://news.ycombinator.com/item?id=29261810 Speaking of Forth experts -- there's Mitch Bradley, who created OpenFirmware: https://news.ycombinator.com/item?id=21822840 Here's the interview with Mitch Bradley saved on archive.org: https://web.archive.org/web/20120118132847/http://howsoftwar... [...] https://news.ycombinator.com/item?id=27484426 I wrote malloc.fth for Mitch Bradley's ForthMacs, which ended up in OpenFirmware: https://github.com/openbios/openfirmware/blob/master/ofw/cor... [...] https://news.ycombinator.com/item?id=26892629 In a lot of FORTH implementations, constant numb
Read the rest
ers like 0, 1, -1 and others are hard coded, not just for speed but also for space: a call to a code word only takes one cell, instead of using two cells with a LIT [value]. Here's some Breshenham line code I first wrote in FORTH (Mitch Bradley's SunForth on a 68k Sun-2 with cg2 graphics board), then translated to 68k code (using the rpn FORTH assembler) -- the FORTH code is commented out before the corresponding assembly code: https://donhopkins.com/home/archive/forth/cg/line.f [...] https://news.ycombinator.com/item?id=17480298 Cool! Does it include a FORTH 6502 assembler written in FORTH? I love writing assembly code in RPN with Forth macros! You can write FORTH code with loops and conditionals and any kind of logic and parameters, that dynamically assembles machine code! Much better than your typical macro assembler. Here's some 6502 assembler for an Apple ][ SUPDUP terminal emulator that does ram card bank switching: http://www.donhopkins.com/home/archive/forth/supdup.f [...] https://news.ycombinator.com/item?id=22456471 In what way is PostScript worse than Forth? Please answer with specific details, and provide links to code if you can. I programmed a lot of Forth code before learning and moving on to programming a lot of PostScript code, so I've used each of them extensively, and much prefer PostScript, and I'm happy to show you why and explain by showing you code. [...] https://news.ycombinator.com/item?id=21968175 Kragen is right that PostScript is a lot more like Lisp or Smalltalk than Forth, especially when you use Owen Densmore's object oriented PostScript programming system (which NeWS was based on). PostScript is semantically very different and much higher level that Forth, and syntactically similar to Forth but uses totally different names (exch instead of swap, pop instead of drop, etc). [...]
In Thinking Forth (1984)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.