cosmopolitan/examples
Justine Tunney f0600a898c Fix metal bugs so deathstar.com runs in qemu (#20)
- Remove XD bit in page tables
- Fix cylinder+head+sector arithmetic
- Implement fstat() for serial file descriptors on metal

Here's how to boot an Actually Portable Executable in QEMU:

    make -j12 o//tool/viz/deathstar.com
    qemu-system-x86_64 -serial stdio -fda o//tool/viz/deathstar.com

Here's a screenshot of DEATHSTAR.COM booted in QEMU:
https://justine.lol/cosmopolitan/cosmo-metal-qemu.png

Thus metal support is in much better shape now, but still incomplete.
Only a few system calls have been polyfilled. To figure out which ones
your program needs, simply boot it in the blinkenlights emulator with a
breakpoint, and press CTRL-C to continue to the system call breakpoint.
If it doesn't break then you should be good. (Note: to emulate normally
you can press 'c' and use CTRL-T and ALT-T to tune the speed.)

    m=tiny
    make -j12 SILENT=0 MODE=$m          \
      o/$m/tool/build/blinkenlights.com \
      o/$m/tool/viz/deathstar.com
    o/$m/tool/build/blinkenlights.com   \
      -r -t -b systemfive.linux         \
      o/$m/tool/viz/deathstar.com

Thank @Theldus for the bug report that made this change possible.
Fixes #20 which explains this change further.
2021-01-16 17:52:15 -08:00
..
package Fix link order in cosmopolitan.a 2021-01-16 12:05:41 -08:00
auto-launch-gdb-on-crash.c Make improvements 2020-12-01 03:43:40 -08:00
bigmem.c Add x86_64-linux-gnu emulator 2020-08-25 04:43:42 -07:00
breakpoint.c Initial import 2020-06-15 07:18:57 -07:00
cp.c Fold conv package into fmt 2020-12-09 16:52:00 -08:00
cplusplus.cc Change license 2020-12-27 17:18:44 -08:00
crashreport.c Initial import 2020-06-15 07:18:57 -07:00
ctrlc.c Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
date.c Initial import 2020-06-15 07:18:57 -07:00
dinlerp.c Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
examples.mk Fix link order in cosmopolitan.a 2021-01-16 12:05:41 -08:00
findprime.c Fold conv package into fmt 2020-12-09 16:52:00 -08:00
forkrand.c Make improvements 2020-12-01 03:43:40 -08:00
generalized-automatic-datastructure-printing.c Initial import 2020-06-15 07:18:57 -07:00
gui.c Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
hangman.c Add epoll and do more release readiness changes 2020-11-28 12:01:51 -08:00
hello.c Get fork() working on Windows 2020-11-13 03:14:39 -08:00
hello.js Initial import 2020-06-15 07:18:57 -07:00
hello2.c Add pseudoteletypewriter to emulator 2020-08-29 23:51:09 -07:00
hello3.c Initial import 2020-06-15 07:18:57 -07:00
hello4.c Initial import 2020-06-15 07:18:57 -07:00
hellojs.c Make terminal ui binaries work well everywhere 2020-10-19 06:38:31 -07:00
invtsc.c Add chibicc 2020-12-06 16:20:21 -08:00
ispell.c Fold conv package into fmt 2020-12-09 16:52:00 -08:00
kilo.c Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
life.c Initial import 2020-06-15 07:18:57 -07:00
ls.c Make improvements 2020-09-14 00:02:34 -07:00
lstime.c Improve documentation 2020-12-27 07:02:35 -08:00
mappy.c Get address sanitizer mostly working 2020-09-03 05:44:37 -07:00
nesemu1.cc Link zipos into NESEMU1 2021-01-16 12:32:54 -08:00
peek.c Change license 2020-12-27 17:18:44 -08:00
pipe.c Change license 2020-12-27 17:18:44 -08:00
poll.c Initial import 2020-06-15 07:18:57 -07:00
printargs.c Get Cosmopolitan into releasable state 2020-11-25 08:19:00 -08:00
printprimes.c Fold conv package into fmt 2020-12-09 16:52:00 -08:00
rawmode.c Initial import 2020-06-15 07:18:57 -07:00
rusage.c Get address sanitizer mostly working 2020-09-03 05:44:37 -07:00
stat.c Fix metal bugs so deathstar.com runs in qemu (#20) 2021-01-16 17:52:15 -08:00
subprocess.c Fold conv package into fmt 2020-12-09 16:52:00 -08:00
tiny-raw-linux-tutorial.S Change license 2020-12-27 17:18:44 -08:00
ttyinfo.c Make terminal ui binaries work well everywhere 2020-10-19 06:38:31 -07:00
uname.c Initial import 2020-06-15 07:18:57 -07:00
unbourne.c Change license 2020-12-27 17:18:44 -08:00
x86split.c Add x86_64-linux-gnu emulator 2020-08-25 04:43:42 -07:00