Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!news From: gson@niksula.hut.fi (Andreas Gustafsson) Newsgroups: comp.sys.handhelds Subject: CHIP-8 limitations (was: ) Message-ID: <1990Nov15.095509.1001@santra.uucp> Date: 15 Nov 90 09:55:09 GMT References: <0471181703FF001A65@gacvx2.gac.edu> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: gson@niksula.hut.fi (Andreas Gustafsson) Organization: Helsinki University of Technology, FINLAND Lines: 24 In article <0471181703FF001A65@gacvx2.gac.edu> CW%APG.PH.UCL.AC.UK@pucc.PRINCETON.EDU writes: > i) I find moving the sprite to the left is quite difficult > since there is no equivalent instruction to Vx=Vx-KK only > Vx=Vx+KK. Am I missing something fundamental? Does anyone have > a nice little routine or algorhythm (spelling?) to explain > a simple way to do it. Yes, you are missing something fundamental. Because all arithmetic in CHIP-8 is done modulo 256, you can subtract a constant simply by adding the two's complement of that constant. For instance, the instruction 7AFF will subtract one from VA. > ii) Can the string that contains the game be any length, or is > it REALLY limited to 4K. Three and a half, actually, because the addresses 000-1FF are reserved. But CHIP-8 code is very compact, so you can do quite a lot in 3.5 k. You should remember that CHIP-8 was originally designed in the late seventies, to run on machines that seldom had more that one or two k of memory. -- Andreas Gustafsson Internet: gson@niksula.hut.fi Voice: +358 0 563 5592