Hello everyone, before you read this, I do have a question about one of my new projects I really want to make... itís near the end of this post.

Project 1: 2D Minecraft CE
Project 2: 2D Minecraft CE Launcher
Project 3: Advanced Calc CEís ICE programs (with basically routines not available in BASIC)
Project 4: *NEW PROJECT* On-calc ASM Compiler written in ICE.

So, the question is FOR MY ON-CALC ASM COMPILER project...
So, Iíve had several people to help me gind the hex versions of some tokens and even regular ez80 asm code, but...
Is the ld <var>,<value> Ďs token in asm hex ďFDĒ?
I might have a few more pieces of code like this soon...
but thanks everyone!!!

EDIT 1:
Ok so another question, in the code:
ld a,(iy+8)
... wouldnít Ďld Ď as hex be FD, and Ďaí be 7E, and Ď(iy+8) be 08? Or is Ďaí 08 and Ď(iy+8)í be 7E?

The full hex code is for Toggle Program Mode, which I found somewhere a while back. Here it is:
FD7E08EE02FD7708C9
... and itís non-hex code was:
ld a,(iy+8)
xor 2
ld (iy+8),a
ret
CAN SOMEONE PLEASE TELL ME WHAT EACH PART of the code aboveís 2-character hex is? Like, how would I match up the hexadecimal code to the other code?
Iím asking, still, because Iím trying to understand how asm compiling would work, since Iím making an on-calc asm compiler..
MateoConLechuga wrote:

Code:
I can never find a SIMPLE list of the hexadecimal codes and their simple explanations, like ďC9 is Done. It quits the code and returnsĒ, or whatever.


Commands start on page 79:
http://www.zilog.com/force_download.php?filepath=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTlWVFRBd056Y3VjR1Jt


There's literally a description of the opcode and operand hexadecimal representation on each page.
Please, for the love of all things swiss cheese, use [code][/code] tags for code:


Code:

your code


Anyways, 7E corresponds to ld a,(hl) (look it up in the charts we pointed you to). This copies the contents pointed to bu HL into A. By putting an FD in front of it, we use the index register called IY to replace HL (and using DD, uses IX). So it becomes ld a,(iy). BUT using index registers like this requires an offset, so for the love of crÍpes, dont use FD7E ! FD7E00 is ld a,(iy+0), but FD7E08 is ld a,(iy+8). Why IY? Because the OS keeps IY pointing to the system flags. As for XOR 2, we do that to toggle the second lowest bit (bit 1) of A. To toggle bit 2, use XOR 4, and bit 6 is XOR 64. Notice that bit n corresponds to 2^n.

Now take the fact that 77 is ld (hl),a to figure out the next instruction, FD7708. And you know RET.
A quick opcode reference that should help as well. Note that the $DD and $FD opcode prefixes are for IX and IY, respectively. $DD can be swapped for $FD for IY instead of IX, and vice versa.
Also: some self-promotion that works better on mobile than the above reference, and is identical.
Good luck, Asm has a steep learning curve to learn, and an even steeper learning curve to master.


Registers do not have a memory adress. They are part of the processor.
There are 8 registers:
BC, DE, HL, AF, IX, IY, SP, PC
Most of these registers can be accessed as 24-bit registers, or 8-bit registers.
BC=BCU,B,C
DE=DEU,D,E
HL=HLU,H,L
IX=IXU,IXH,IXL
IY=IYU,IYH,IYL
Note that the upper byte of these registers cannot be accessed directly.
SP=stack pointer
PC=program counter
Thanks everybody! I appreciate all your help!

I literally just realized the emojis replaced my code earlier 0x5
Iím on mobile, so trying to go back and correct word errors is really hard on iPods. It kinda jumps around trying to move the cursor, but I kinda got used to it, but thereís really nothing wrong with this site on mobile Safari I donít think.

But either way, I really appreciate everything you guys are doing and helping me with! I know itís been a lot of questions, but Iím glad yíall still are here to help me!
Yay! So I have been working on my ASM compiler project, and I was able to open a program and save itís contents to a string variable all in ICE, and also save it to the OS variable ĎStr2í... without a bunch of random ASCII characters that used to annoyingly replace lowercase letters, and that annoying newline Ď:í replacement with a Ď?í, so itís clean in the string...
But I DID have to make it scan for the Ď?í as the newline Ď:í at the start, so I can get a newline count. When the code is copied to the string, there isnít and newlines in it, or anything, just spaces instead, so the counterís needed.

Itís hard to explain, but if youíve tried loading a programís data that contains chars like Ďaí, it gets annoying.

The newline counter will be used to calculate the conversion progress barís ďprogressĒ (based from ICE Compiler, full credit to PT_)! Basically, itíll go from left to right without jumping back to the left.

Itís going good. I need to make and/or add:
- Built-in ASM source code editor into the asm compiler, so chars like Ď$í,í@Ď,etc., can be accessed easier. I might need to make it edit inc files too, unless they wonít or canít be used in asm hexcodes.
- Auto-search for asm source programs feature
- Beautify menus, they all pretty much use output()...itís sad Razz
- Make a separate program to add your own asm opcodes and their hexadecimals into an appvar, so anytime I get them, I can add them a lot quicker, so they can be used in the converter.
I NEED HELP!!!!!

Iíve looked at the source for Xenon, and Iím still confused. I canít figure out how to find any programs that have a

Code:

:.ASM

at the first line. I used to know how, but Iím still having to get back used to ICE programming, since a while back I wasnít able to charge my calc for a few months.

Like, itís confusing now, and I NEED help PLEASE!! Can someone give me the code to find those programs?

And, Iíve been able to open a program in ICE and save itís contents in a string, so it can be used on the homescreen. But the new line colons were not able to be put in it. Instead, it put a space in the string and not the colons.

But can someone help me??
I have an ICE program for program and appear detection/reading that could be helpful. I can send you the source if you want.
epsilon5 wrote:
I have an ICE program for program and appear detection/reading that could be helpful. I can send you the source if you want.


YES PLEASE!!! Thank you so much!!
Smile
As to the colon issue, I believe that that is a token and should be used with single quotes, not double quotes. That's probably your issue.
  
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 GMT - 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