KermMartian wrote:
Probably because you're not using Doors CS 7's Homerun feature. If you want to run it without Doors CS, you need to run it as Asm(prgmBLAH.


I am using Asm(prgmNAME.
Try changing the bcalls so they look like b_call(<bcall>). Also, try compiling it with Brass and see if it outputs an error.
souvik1997 wrote:
Try changing the bcalls so they look like b_call(<bcall>). Also, try compiling it with Brass and see if it outputs an error.


Could you give me an example of bcall like that? I don't understand the format ('>','<')
Yeah, you should be using Brass instead of SPASM, it's much better. What error is occur
ring, exactly?
Where can I download BRASS?
The error in SPASM is: '83+ programs don't start with bytes BB 6D'
The error in WabbitEmu is INVALID in the line Asm(prgmNAME.
Use the Doors CS SDK, it includes the Brass assembler.
souvik1997 wrote:
Use the Doors CS SDK, it includes the Brass assembler.
Exactly this, thanks Souvik. Smile Please feel free to ask any questions if you're having trouble using the SDK.
Now my doubt is, again, creating .8xp files:


Code:

programData = "2A2A54493833462A1A0A0042696E50616338782028632
9323031302043656D65746563682E6E6574264B65726D
204D61727469616E22000D001100064C44484C3100000
0000011000F00BB6DEF404521FFFFEF0745EF7249"


f = open('myData.8xp', 'w')
f.write(programData)
f.close()


This is my code, it creates the file myData.8xp.

Note: This hexadecimal code was produced with binpac and brass (doorsCS sdk), it's just for testing creating 8xp files.

When I open that in WabbitEmu it says invalid format, any idea?

Edit by Kerm: added line breaks.
Once again, as I've tried explaining, hex in ASCII nibbles and hex as bytes are not the same. The byte $2A is not the same as the string '2A', which is two bytes: the character '2', and the character 'A'.
You will have to write the hex directly to the file, not the actual hex nibbles like Kerm said. Here is a link that may help you. http://bytes.com/topic/python/answers/43276-write-hexadecimal-file
I think the reason you're confused is because you've done hex programming on the calculator.

One thing you've got to understand is that when you did that, you weren't actually typing compiled data. You were just typing ASCII characters, which the calculator had to convert to pure data before it could be run.

As Kerm said, the string "2A" is very different from the byte $2A. $2A is a number, a byte of data. "2A" is two separate ASCII characters, each of which is represented by a byte ($32,$41).
Souvik, Deep Thought, thanks for your additions to my point, I agree entirely with both of you. Hopefully this makes sense to Scout now. Smile
I am aware (and have been aware for a long time) that $2A != '2A'.

However, I was looking for a sample code to create a 8xp file, I guess I'll have to search deeper, thanks.
Did you check my link that I posted above?
souvik1997 wrote:
Did you check my link that I posted above?


Yes I did, they have the right code, but they don't say what kind of variable 'bytes' is.
That's the type. Bytes is the name of the type.
OH YEAH Like in the tokenizer thread (bytearray, append, etc).

I have one doubt though.

bytes.append($DE)

OR

bytes.append(DE)

Which one is correct?
Neither are correct. 0xDE is the form that Python uses to represent hexadecimal. DE is never correct, because that would be interpreted as the name of a variable (and what about $32? if append(DE) was correct, how would it distinguish append(32) as hex and append(32) as decimal?). Sadly, Python also does not use the $hex syntax.

Code:
0x2A0x2A0x540x490x380x330x460x2A0x1A0x0A0x000x420x69
0x6E0x500x610x630x380x780x200x280x630x290x320x300x310x30
0x200x430x650x6D0x650x740x650x630x680x2E0x6E0x650x740x26
0x4B0x650x720x6D0x200x4D0x610x720x740x690x610x6E0x220x00
0x0D0x000x110x000x060x4C0x440x480x4C0x310x000x000x000x00
0x000x110x000x0F0x000xBB0x6D0xEF0x400x450x210xFF0xFF0xEF0
x070x450xEF0x720x49


I made a small engine to convert Hex data to Python-Readable Hex Data Very Happy

Edit by Tanner: Added line breaks, that was all one line x.x
Err, you mean like this? Razz

Code:
outstring = ""
for i in range(0,len(instring)/2):
    outstring += "0x"+instring[2*i:2*i+1]
  
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 3 of 4
» 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