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)
|
||||
`(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 ()
|
||||
(c-parser (c-lexer errorp) errorp))))
|
||||
|
||||
(display "program: " 2)
|
||||
(display (mescc) 2)
|
||||
(newline 2)
|
||||
(display "program: " (current-error-port))
|
||||
(display (mescc) (current-error-port))
|
||||
(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))
|
||||
(map write-char elf-header)
|
||||
;;(map write-char elf-header)
|
||||
(map write-int elf-header)
|
||||
(newline)
|
||||
|
|
Loading…
Reference in a new issue