ok me and tanner were working on this i want to compile a simple program to decompress and print some data heres the latest error


Code:
----------------------------------
   Doors CS Assembler\Compiler
          Version 2.0
     Written by Kerm Martian
     http:\\www.Cemetech.net
----------------------------------
----- Assembling decomp for the TI-83/84 Plus...
Brass Z80 Assembler 1.0.4.11 - Ben Ryves 2005-2006
--------------------------------------------------
Assembling...
Pass 1 complete. (2233ms).
Error: Could not parse expression 'SpriteCount' (Invalid number). [zztemp.asm:7]

Error: Could not parse expression 'gbuf' (Invalid number). [zztemp.asm:10]
Error: Could not parse expression 'iPutScreen' (Invalid number). [zztemp.asm:12]

Error: Could not parse expression 'common_array' (Invalid number). [zztemp.asm:4
6]
Error: Could not parse expression 'common_array&255' (Invalid number). [zztemp.a
sm:84]
Error: Could not parse expression '(common_array>>8)&255' (Invalid number). [zzt
emp.asm:86]
Pass 2 complete. (1422ms).
Errors: 6, Warnings: 0.
Build failed.
 --+=====================+--
 --|    BinPac8x v1.2    |--
 --|   by Kerm Martian   |--
 --|   www.Cemetech.net  |--
 --|  admin@cemetech.net |--
 --+=====================+--
**Pass 1/1: .8xp Construction**
Error: Input file decomp.bin was not found!
Total time: 0.0s
----- decomp for the TI-83/84 Plus Assembled and Compiled.
TI-83 Plus version is decomp.8xp
Could Not Find C:\dwedit\asm\exec\decomp.bin

Code:
#INCLUDE TI83plus.inc


   LD hl,myCompressedData
   LD de,AppBackupScreen
   LD b,SpriteCount ;*shrug*
   call decomp
   LD bc,767
   LD de,gbuf
   Ldir
   call iPutScreen ;Whichever one copies gbuf to the screen >.>
   ret



decomp:
   LD    C, %10000000
   DEC   HL
dc_mainloop
   PUSH  BC
   LD    B, %00011111
   CALL  IsBit
   JR    C, dc_switch
   SET   5, B
   JR    dc_innerloop
dc_switch:
   LD    A, 1
   CALL  IsBit
   JR    C, dc_other
   RES   4, B
   CALL  IsBit
   JR    C, dc_getcommon
   SET   7, B
   JR    dc_innerloop
dc_other:
   ADD   A, A
   CALL  IsBit
   JR    NC, dc_getcommon
   ADD   A, A
   SET   6, B
dc_getcommon:
   PUSH  BC
   PUSH  DE
   LD    B, A
   LD    DE, common_array
dc_getloop:
   CALL  GetByte
   LD    (DE), A
   INC   DE
   DJNZ  dc_getloop
   POP   DE
   POP   BC
;   BIT   6, B
;   JR    NZ, dc_assume0
dc_innerloop:
   BIT   7, B
   JR    NZ, dc_raw
   LD    A, %01000000
   BIT   6, B
   JR    NZ, dc_common
   CALL  IsBit
   JR    NC, dc_raw
   BIT   5, B
   JR    NZ, dc_fill
   RLCA
   CALL  IsBit
   JR    C, dc_common
dc_fill:
   CALL  IsBit
   SBC   A, A
   JR    dc_output
dc_raw:
   CALL  GetByte
   JR    dc_output
dc_common:
   BIT   4, B
   JR    NZ, dc_multiple
dc_assume0:
   XOR   A
dc_multiple:
   CALL  NZ, GetBits
   PUSH  DE
   ADD   A, common_array&255
   LD    E, A
   ADC   A, (common_array>>8)&255
   SUB   E
   LD    D, A
   LD    A, (DE)
   POP   DE
dc_output:
   LD    (DE), A
   INC   DE
   DEC   B
   BIT   3, B
   JR    NZ, dc_innerloop
   POP   AF
   LD    B, A
   DJNZ  dc_mainloop
dc_finish:
   RLC   C
   RET   C
   RLC   (HL)
   JR    dc_finish

IsBit:
   RLC   C
   JR    NC, dc_stay
   INC   HL
dc_stay:
   RLC   (HL)
   RET

GetByte:
   LD    A, %00000001
GetBits:
   CALL  IsBit
   RLA
   JR    NC, GetBits
   RET
   
   
   
myCompressedData:
 .db 27
 .db %01010101,%00111100,%00101000,%00100001,%10100010,%00000100,%00110100
 .db %10011111,%01000110,%01100111,%10011110,%01110100,%10100010,%01001110
 .db %00010000,%10010100,%10010011,%11010010,%00010010,%00010010,%10010001
 .db %01000010,%01000010,%00001110,%01110110,%00110001,%11000000
The errors mean that the labels aren't defined. In the case of gbuf and iPutScreen you will need to #include the relevant include file for the shell you are using. common_array and SpriteCount depend on what exactly you're trying to do...
You need to replace SpriteCount with how many sprites you have. #define SpriteCount 1. Also, as I told you in IRC just now, it's #include "ti83plus.inc". You can also try putting spaces before and after ">>". gbuf is PlotSScreen iirc. If I think of anything else, I'll post.
Indeed, try this:

#include "ti83plus.inc"
#include "dcs7.inc"

in that order. And as Ben and Tanner said, things like SpriteCount haven't been defined.
I also just remembered that it was iFastCopy, not iPutScreen.
ok iFastCopy fixed that error but


Code:
----------------------------------
   Doors CS Assembler\Compiler
          Version 2.0
     Written by Kerm Martian
     http:\\www.Cemetech.net
----------------------------------
----- Assembling decomp for the TI-83/84 Plus...
Brass Z80 Assembler 1.0.4.11 - Ben Ryves 2005-2006
--------------------------------------------------
Assembling...
Pass 1 complete. (2513ms).
Error: Could not parse expression 'common_array' (Invalid number). [zztemp.asm:4
7]
Error: Could not parse expression 'common_array&255' (Invalid number). [zztemp.a
sm:85]
Error: Could not parse expression '(common_array>>8)&255' (Invalid number). [zzt
emp.asm:87]
Pass 2 complete. (1171ms).
Errors: 4, Warnings: 0.
Build failed.
 --+=====================+--
 --|    BinPac8x v1.2    |--
 --|   by Kerm Martian   |--
 --|   www.Cemetech.net  |--
 --|  admin@cemetech.net |--
 --+=====================+--
**Pass 1/1: .8xp Construction**
Error: Input file decomp.bin was not found!
Total time: 0.0s
----- decomp for the TI-83/84 Plus Assembled and Compiled.
TI-83 Plus version is decomp.8xp
Could Not Find C:\dwedit\asm\exec\decomp.bin
You haven't defined where common_array is. Razz Is this your own code?
nope its the decompiler for spiffy its how it came :/
geekboy1011 wrote:
nope its the decompiler for spiffy its how it came :/
A decompiler called "Spiffy" decompiled the code with that exact constant?
well the compression method is called spiffy and its used for things like pictures and tile maps im not to sure i get your question
geekboy1011 wrote:
well the compression method is called spiffy and its used for things like pictures and tile maps im not to sure i get your question
Oh, a decompressor is not the same as a decompiler. A decompiler takes a binary (like a .8xp) and turns it back into more-or-less readable source code. A decompressor expands compressed data. You must have gotten this routine from somewhere; it should definite those constants there.
http://www.ticalc.org/archives/files/fileinfo/178/17865.html
oh wow mental lapse there sorry man im out of it today cant type spell or say what i mean im on a roll XD

any way how would one go about making it so it keeps the image on the screen till a key is pressed?
Use this page to get the correct groups and masks. http://future_history.freehostia.com/Files/Resources/Tutorials/ASMin28Days/lesson/day22.html . And then you do something like this:
Code:
Label:
ld a,Group
out (1),a
nop \ nop ;Because Kerm says that your calculator will laugh at you :(
in a,(1)
cp Mask
jr nz,Label
Or if this was a one time loop, and you don't really care if it crashes or not, you could do:
Code:
jr $
Endless loops all around!

Edit: See also from here down: http://www.cemetech.net/forum/viewtopic.php?p=129304#129304
I still like that comment. Wink Oh, and my post above was supposed to say *it should define those constants there.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement