resurrect guile-mescc, use write-int and (current-error-port) iso `2'.
This commit is contained in:
parent
697858f670
commit
038f4c71be
|
@ -20,3 +20,7 @@
|
||||||
|
|
||||||
(define-macro (defined? x)
|
(define-macro (defined? x)
|
||||||
`(assq ,x (cddr (current-module))))
|
`(assq ,x (cddr (current-module))))
|
||||||
|
|
||||||
|
(define (current-input-port) 0)
|
||||||
|
(define (current-output-port) 1)
|
||||||
|
(define (current-error-port) 2)
|
||||||
|
|
12
mescc.scm
12
mescc.scm
|
@ -405,12 +405,14 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(c-parser (c-lexer errorp) errorp))))
|
(c-parser (c-lexer errorp) errorp))))
|
||||||
|
|
||||||
(display "program: " 2)
|
(display "program: " (current-error-port))
|
||||||
(display (mescc) 2)
|
(display (mescc) (current-error-port))
|
||||||
(newline 2)
|
(newline (current-error-port))
|
||||||
|
|
||||||
(define elf-header '(#x7f #E #L #F #x01))
|
(define (write-int x) (write-char (integer->char x)))
|
||||||
|
(define elf-header '(#x7f #\E #\L #\F #x01))
|
||||||
|
|
||||||
(define elf-header '(#x7f #x45 #x4c #x46 #x01))
|
(define elf-header '(#x7f #x45 #x4c #x46 #x01))
|
||||||
(map write-char elf-header)
|
;;(map write-char elf-header)
|
||||||
|
(map write-int elf-header)
|
||||||
(newline)
|
(newline)
|
||||||
|
|
Loading…
Reference in a new issue