boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

030-bv-set-ref.scm (348B)


      1 ; bytevector-u8-set! / bytevector-u8-ref round-trip; sum stays correct.
      2 (define b (make-bytevector 4 0))
      3 (bytevector-u8-set! b 0 7)
      4 (bytevector-u8-set! b 1 11)
      5 (bytevector-u8-set! b 2 13)
      6 (bytevector-u8-set! b 3 17)
      7 (sys-exit (+ (+ (bytevector-u8-ref b 0) (bytevector-u8-ref b 1))
      8              (+ (bytevector-u8-ref b 2) (bytevector-u8-ref b 3))))