diff options
| author | Mistivia <i@mistivia.com> | 2024-12-05 21:49:00 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2024-12-05 21:49:00 +0800 |
| commit | cd818993399f1fc8fa000b4144730affd291761f (patch) | |
| tree | 13d546dd873ad37e850cf089c322b91a20d25ccf /assembler/fvm-as.scm | |
| parent | 79194983d0331d632bd094370a410fa0aaefe6aa (diff) | |
add syscall
Diffstat (limited to 'assembler/fvm-as.scm')
| -rw-r--r-- | assembler/fvm-as.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/assembler/fvm-as.scm b/assembler/fvm-as.scm index 8730e66..555f36f 100644 --- a/assembler/fvm-as.scm +++ b/assembler/fvm-as.scm @@ -153,15 +153,14 @@ (define (output-prog prog output-file) (define (write-number x port) - (cond ((or (rational? x) - (real? x)) (write-string - (blob->string (f64vector->blob (f64vector x))) - #f - port)) - ((integer? x) (write-string (blob->string + (cond ((exact-integer? x) (write-string (blob->string (u64vector->blob (u64vector x))) #f port)) + ((real? x) (write-string + (blob->string (f64vector->blob (f64vector x))) + #f + port)) (else (abort "Expect a number")))) (call-with-output-file output-file (lambda (port) |
