2c2 < ; 8088 op code generator function 6/29/91 last mod 7/22/92 --- > ; 8088 op code generator function 6/29/91 3a4 > ; port to s88 2/11/91 5,10c6 < (define hex < (let ((digit #("0" "1" "2" "3" "4" "5" "6" "7" < "8" "9" "A" "B" "C" "D" "E" "F"))) < (lambda (v) < (string-append (vector-ref digit (quotient v 16)) < (vector-ref digit (modulo v 16)))))) --- > (define member? memq) 12,38d7 < (define hexp < (lambda (h) < (if (pair? h) < (map hex h) < (hex h)))) < ; < (define bin < (lambda (v) < (letrec < ((d->b (lambda (v n r) < (if (zero? n) r < (d->b (quotient v 2) < (sub1 n) < (cons (if (zero? (modulo v 2)) #\0 #\1) < r)))))) < (list->string (d->b v 8 ()))))) < (define binp < (lambda (h) < (if (pair? h) < (map bin h) < (bin h)))) < ; < ; < (define member? < (lambda (a l) < (pair? (member a l)))) < ; 185,190c154,155 < < (extend-syntax (opc) < ((opc . args) < (with ((result (apply opc-fn 'args))) < 'result))) < --- > ; MAIN OP CODE GENERATOR FUNCTION > ; 284,285d248 < ((fsin) '(#b11011001 #b11111110)) ; not in 8087 < ((fcos) '(#b11011001 #b11111111)) ; not in 8087 360,365d322 < ((eq? i 'xchg) < (cond < ((zero? w) (error 'op-gen1 "xchg with ax must be word")) < (seg (error 'op-gen1 "xchg with ax can not be seg reg")) < (norm (+ #b10010000 reg)) < (else (error 'op-gen1 "xchg")))) 459d415 <