|
14 | 14 | @(define codeblock-include (make-codeblock-include #'here)) |
15 | 15 |
|
16 | 16 | @(ev '(require rackunit a86)) |
17 | | -@(for-each (λ (f) (ev `(require (file ,(path->string (build-path notes "abscond" f)))))) |
| 17 | +@(for-each (λ (f) (ev `(require (file ,(path->string (build-path langs "abscond" f)))))) |
18 | 18 | '("interp.rkt" "ast.rkt" "compile.rkt")) |
19 | 19 |
|
20 | 20 | @(define (shellbox . s) |
21 | | - (parameterize ([current-directory (build-path notes "abscond")]) |
| 21 | + (parameterize ([current-directory (build-path langs "abscond")]) |
22 | 22 | (filebox (emph "shell") |
23 | 23 | (fancyverbatim "fish" (apply shell s))))) |
24 | 24 |
|
25 | 25 | @(require (for-syntax "../utils.rkt" racket/base "utils.rkt")) |
26 | 26 | @(define-syntax (shell-expand stx) |
27 | 27 | (syntax-case stx () |
28 | 28 | [(_ s ...) |
29 | | - (parameterize ([current-directory (build-path notes "abscond")]) |
| 29 | + (parameterize ([current-directory (build-path langs "abscond")]) |
30 | 30 | (begin (apply shell (syntax->datum #'(s ...))) |
31 | 31 | #'(void)))])) |
32 | 32 |
|
@@ -292,14 +292,14 @@ So our compiler will emit x86 assembly code. To make our lives a bit |
292 | 292 | easier, we will write the run-time system in C. Let's start with the |
293 | 293 | Abscond runtime: |
294 | 294 |
|
295 | | -@filebox-include[fancy-c "abscond/main.c"] |
| 295 | +@filebox-include[fancy-c abscond "main.c"] |
296 | 296 |
|
297 | 297 | This C program provides the main entry point for running an Abscond |
298 | 298 | program. It relies upon a function @tt{print_result} which is defined |
299 | 299 | as follows: |
300 | 300 |
|
301 | | -@filebox-include[fancy-c "abscond/print.h"] |
302 | | -@filebox-include[fancy-c "abscond/print.c"] |
| 301 | +@filebox-include[fancy-c abscond "print.h"] |
| 302 | +@filebox-include[fancy-c abscond "print.c"] |
303 | 303 |
|
304 | 304 | Separating out @tt{print_result}, which at this point is just a simple |
305 | 305 | @tt{printf} statement, seems like overkill, but it will be useful in |
@@ -334,7 +334,7 @@ example. Let's say the Abscond program is @racket[42]. What should |
334 | 334 | the assembly code for this program look like? Here we have to learn a |
335 | 335 | bit about the x86-64 assembly language. |
336 | 336 |
|
337 | | -@filebox-include[fancy-nasm "abscond/42.s"] |
| 337 | +@filebox-include[fancy-nasm abscond "42.s"] |
338 | 338 |
|
339 | 339 | @margin-note{Note: on macOS, labels must be prepended with @tt{_}, |
340 | 340 | while on Linux they are not; e.g. @tt{_entry} vs @tt{entry}.} |
@@ -449,7 +449,7 @@ Using a Makefile, we can capture the whole compilation dependencies as: |
449 | 449 | @margin-note{Note: the appropriate object file format is detected |
450 | 450 | based on the operating system.} |
451 | 451 |
|
452 | | -@filebox-include[fancy-make "abscond/Makefile"] |
| 452 | +@filebox-include[fancy-make abscond "Makefile"] |
453 | 453 |
|
454 | 454 | And now compiling Abscond programs is easy-peasy: |
455 | 455 |
|
|
0 commit comments