Stub remaining prescheme interface symbols

This commit is contained in:
Andrew Whatson 2022-07-17 00:23:47 +10:00
parent 8156aa6dd6
commit 470d13dd98
4 changed files with 90 additions and 5 deletions

View file

@ -13,7 +13,8 @@
#:use-module (prescheme ps-defenum)
#:use-module (prescheme memory)
#:re-export
(if begin lambda letrec quote set!
(;; prescheme-interface
if begin lambda letrec quote set!
define define-syntax let-syntax letrec-syntax
and cond case do let let* or
quasiquote
@ -71,4 +72,34 @@
bitwise-and bitwise-ior bitwise-xor bitwise-not
unspecific
error
))
;; ps-memory-interface
allocate-memory
deallocate-memory
unsigned-byte-ref unsigned-byte-set!
word-ref word-set!
flonum-ref flonum-set!
address?
null-address null-address?
address+ address- address-difference
address= address< address<= address> address>=
address->integer integer->address
copy-memory! memory-equal?
char-pointer->string char-pointer->nul-terminated-string
read-block write-block
;; ps-flonums-interface
fl+ fl- fl* fl/ fl= fl< fl> fl<= fl>=
;; ps-unsigned-integers-interface
un+ un- un* unquotient unremainder un= un< un> un<= un>=
unsigned->integer integer->unsigned
;; ps-receive-interface
receive))

View file

@ -28,7 +28,26 @@
(define-module (prescheme memory)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
#:use-module (prescheme scheme48))
#:use-module (prescheme scheme48)
#:export (allocate-memory
deallocate-memory
unsigned-byte-ref unsigned-byte-set!
word-ref word-set!
flonum-ref flonum-set!
address?
null-address null-address?
address+ address- address-difference
address= address< address<= address> address>=
address->integer integer->address
copy-memory! memory-equal?
char-pointer->string char-pointer->nul-terminated-string
read-block write-block))
(define-record-type :address
(make-address index)

View file

@ -32,7 +32,11 @@
goto
external
))
fl+ fl- fl* fl/ fl= fl< fl> fl<= fl>=
un+ un- un* unquotient unremainder un= un< un> un<= un>=
unsigned->integer integer->unsigned))
(define shift-left arithmetic-shift)
@ -159,3 +163,19 @@
(cadddr exp))))
(define current-error-port current-output-port)
;; ps-flonums
(define fl+ +) (define fl- -) (define fl* *) (define fl/ /)
(define fl= =)
(define fl< <) (define fl> >)
(define fl<= <=) (define fl>= >=)
;; ps-unsigned-integers
(define un+ +) (define un- -) (define un* *)
(define unquotient quotient)
(define unremainder remainder)
(define un= =)
(define un< <) (define un> >)
(define un<= <=) (define un>= >=)
(define (unsigned->integer x) x)
(define (integer->unsigned x) x)

View file

@ -4,11 +4,21 @@
;;;
(define-module (prescheme scheme48)
#:use-module (srfi srfi-8)
#:use-module (srfi srfi-60)
#:export (arithmetic-shift
define-enumeration
enum
name->enumerand
enumerand->name))
enumerand->name
ascii->char
char->ascii
unspecific)
#:re-export (bitwise-and
bitwise-ior
bitwise-xor
bitwise-not
receive))
(define arithmetic-shift ash)
@ -19,3 +29,8 @@
(define enum (const #f))
(define name->enumerand (const #f))
(define enumerand->name (const #f))
(define ascii->char (const #f))
(define char->ascii (const #f))
(define unspecific (const #f))