about summary refs log tree commit diff stats
path: root/linux/bootstrap/build
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-04-15 22:51:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-04-15 22:56:59 -0700
commit6392f1fde9a1177085954e42b9517f73acac88fe (patch)
treef00df23728ed5f2789930a183084d6f777ed2d75 /linux/bootstrap/build
parentde993bc0cdb7202390c9ed1d0c4e0a5b33d1d0ee (diff)
downloadmu-6392f1fde9a1177085954e42b9517f73acac88fe.tar.gz
first session programming _within_ the Mu computer
I tried building a function to draw a horizontal line across the screen.
Here's what I have in data.txt:

  (
    (globals . (
      (horline . (fn () (screen y)
                    (horline_1 screen y 0 (width screen))))
      (horline_1 . (fn () (screen y lo hi)
                      (if (>= lo hi)
                        ()
                        ((fn ()
                          (pixel screen lo y 12)
                          (horline_1 screen y (+ lo 1) hi))))))
    ))
    (sandbox . (horline_1 screen 0 0 20))
  )

$ dd if=/dev/zero of=data.img count=20160
$ cat data.txt |dd of=data.img conv=notrunc
$ ./translate shell/*.mu  &&  qemu-system-i386 -hda disk.img -hdb data.img

Result: I can't call (horline screen 0) over a fake screen of width 40.
Some stream overflows somewhere after all the tweaks to various fixed-size
buffers scattered throughout the app. Calling horline_1 gets to a 'hi'
column of 20, but not to 30.
Diffstat (limited to 'linux/bootstrap/build')
0 files changed, 0 insertions, 0 deletions
0700 4219 - add an even simpler build script' href='/akkartik/mu/commit/.travis.yml?h=main&id=c912b7319fb204e95e6d97c2c9c182bcaca8f93e'>c912b731 ^
3968855b ^
a088d5c3 ^
52ea3102 ^
a088d5c3 ^




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48