I started to think about programming a Chip16 emulator 
(https://github.com/tykel/chip16).
Mainly to practice having a somewhat big project in Racket and hopefully 
learning something about how basic hardware behaves.

Before even starting to program I couldn't decide how i would simulate signed 
bytes.
Now, I realize these options are possible to program, and maybe not even hard, 
but I'd like some advice.

Should I use integers? bitwise-and and such allow for some easy use there, but 
then I'd need some special functions to sum, multiply, subtract, etc.

Byte-strings are another option, but they don't support either and, or, 
addition, or subtraction, so I would have to make functions for all of those.

And then I though of vectors of 1's and 0's, which would also carry a load of 
functions to define.

Is there any way I can simulate signed bytes behavior without implementing a 
lot of functions? Is there an alternative that i haven't though of?
                                          
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to