Author |
Message |
|
bfr
Member
Joined: 13 Feb 2006 Posts: 108
|
Posted: 06 Jan 2008 05:29:07 pm Post subject: |
|
|
http://dragonfire.unitedti.org/asmin28/ref/z80is.html
Look where it says "opcode." If the opcode is formed of one 8-bit part (such as 11101011 for ex de,hl), then the instruction takes up one byte. If the opcode is formed of two 8-bit parts for a total of 16 bits (such as 11101101 : 10101000 for lddr), then the instruction takes up two bytes, etc.
There's a probably a better way to find out how many bytes each instruction takes up, as DarkerLine, bananaman or somebody who knows more about Z80 assembly will probably point out.
Last edited by Guest on 06 Jan 2008 05:32:53 pm; edited 1 time in total |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 06 Jan 2008 06:21:35 pm Post subject: |
|
|
**********************************************
A new poll is up for two days! Please visit this link,
Poll Instructions, before voting.
**********************************************
Actually, that works perfectly! I have this file, but I didn't notice that the opcodes were the numbers that the calculator uses for instructions. Thanks!
Last edited by Guest on 19 Jan 2008 09:32:02 pm; edited 1 time in total |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 06 Jan 2008 07:08:27 pm Post subject: |
|
|
More organized chart:
open with note pad or else its hard to read
Last edited by Guest on 06 Jan 2008 07:11:47 pm; edited 1 time in total |
|
Back to top |
|
|
AaroneusTheGreat
Advanced Member
Joined: 01 May 2007 Posts: 290
|
Posted: 06 Jan 2008 07:24:41 pm Post subject: |
|
|
Using an opcode table. You could make a table with two fields, one opcodes and one byte values, and then use a simple script to read through source code, cross reference the opcodes from the source with the table, and then increment a size variable with the value you got from the table. And use that where you need to.
It'd take some time to make though. |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 06 Jan 2008 08:15:18 pm Post subject: |
|
|
Great idea--that's actually what I was thinking about. As for speed, I'm sure that people won't care, but I don't plan to make translation time long--maybe one minute for a GIANT program and two seconds for a small program. |
|
Back to top |
|
|
bananaman Indestructible
Calc Guru
Joined: 12 Sep 2005 Posts: 1124
|
Posted: 06 Jan 2008 09:12:59 pm Post subject: |
|
|
I'm glad to see you working on this project. If you succeed in producing optimized code I may just start programming stuff for the calculator again. My only complain against assembly language programming is the vast amount of time it takes to write anything substantial b/c you personally have to write tons of code that higher level programming languages don't require. QBasic was actually the first language that I learned about 10 yrs. ago so maybe I can still remember some of it. I haven't touched it since elementary school, but I bet it won't take too long to get reacquainted with. |
|
Back to top |
|
|
Art_of_camelot
Member
Joined: 05 Jan 2008 Posts: 152
|
Posted: 07 Jan 2008 10:28:24 pm Post subject: |
|
|
This looks like a very interesting project, and I can't wait to see where it goes. I did dabble with q-basic a bit back in the day and it is fairly easy to work with. Keep it up, I can't wait to see more progress. |
|
Back to top |
|
|
Pseudoprogrammer
Member
Joined: 12 Dec 2006 Posts: 121
|
Posted: 07 Jan 2008 11:36:12 pm Post subject: |
|
|
Eh, even if it ends up making programs the size and speed of BASIC, I will still use it to access things you can't in BASIC. |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 09 Jan 2008 02:30:43 am Post subject: |
|
|
True, you can use Basic+ to access things you can't in Basic, but SLIDE (I'll describe it in a moment) can do the same thing. Basic+ is meant to match ASM for speed and size, especially with help. (That's right, be sure to check example programs--the first one, coming soon, will clear the screen, and draw a line left, right, up, or down depending on key input. It will also quit depending on key input. If you have suggestions, these are a great place to start.)
So what is SLIDE? Check out this website! SLIDE
If you don't care about processor-intensive programs, but want easy-programming ASM-access features, SLIDE is the way to go. It's easier than assembly, and almost as fast. (It's also a great thing to use while waiting for Basic+)
SLIDE is meant to be almost as fast as ASM. Basic+ is meant to be easier and to give almost flawless, if not entirely flawless, ASM code--in other words, it is meant for processor-intensive programs.
By the way, expect a progress update tomorrow. I had to spend time deciding what to do about key input.
Last edited by Guest on 09 Jan 2008 02:31:11 am; edited 1 time in total |
|
Back to top |
|
|
JoostinOnline
Active Member
Joined: 22 Aug 2007 Posts: 559
|
Posted: 09 Jan 2008 10:15:06 pm Post subject: |
|
|
Rebma Boss wrote: True, you can use Basic+ to access things you can't in Basic, but SLIDE (I'll describe it in a moment) can do the same thing.[post="118455"]<{POST_SNAPBACK}>[/post]
I thought SLIDE was dead :confused: I wanted to make programs with it, but IIRC he wanted to wait for another release until ppl started using it. I was so excited when I first learned about it too ... |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 10 Jan 2008 02:50:20 am Post subject: |
|
|
PROGRESS SO FAR
From now on, I will be posting my progress as text files. This way, I can say how much of something has been done, as well as what has been done. I will still post "Next on my to-do list" as replies.
NEXT ON MY TO-DO LIST:
1. Finish Chapter 1 Documentation
2. Add commands for drawing lines
3. Write Test Program #1
Priorities come first, but I hope to have Test Program #1 up by Saturday. Keep on the lookout! |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 10 Jan 2008 12:11:35 pm Post subject: |
|
|
I'm sorry, I forgot to post my progress text file. Here it is! Be sure to view it in a maximized window, because it's in a table format.
Last edited by Guest on 10 Jan 2008 12:12:45 pm; edited 1 time in total |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 18 Jan 2008 10:41:30 am Post subject: |
|
|
Well, I promised to post every week, but I've been very busy, so not much progress yet. What I'm currently working on right now is a sub for parenthesis, so that I can translate the arguments between them. All week, I've been having issues with it, and I realized that the problem is I need to rewrite the whole sub. So, that's my next step. |
|
Back to top |
|
|
WikiGuru ADOS (Attention deficit... Oh! Shiny!)
Elite
Joined: 15 Sep 2005 Posts: 923
|
Posted: 18 Jan 2008 06:14:16 pm Post subject: |
|
|
i'm sorry . I run into that problem a lot, too (re-writing large chunks of code). It's the main reason why I usually drop projects (please don't drop this, it has so much potential to be great!) |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 19 Jan 2008 01:28:59 am Post subject: |
|
|
I don't have an option that allows me to "Add Poll", I have only "New Poll." Can someone in charge allow me to add a poll to this topic so that I don't have to create a new one?
Anyways, here's something for everyone to think about, and that's where the poll is concerned. It might be easier for everybody if I translate TI-Basic code (instead of QuickBasic code) into ASM, the difference being that there would be several new subprograms (similar to Ti-Basic commands) that would include ASM functions, unlike previous Ti-Basic to ASM translators. Once again, the translation would make the program as fast, or almost as fast as, ASM, and QuickBasic would still be needed to debug and write programs.
Here are the pros and cons:
Pros
1. Hopefully everybody knows TI-Basic! It will be easier for everyone to work with, and easier for me to translate.
2. The documentation will be easier to follow. Instead of teaching a new language (QuickBasic), the documentation will simply teach what a Ti-Basic programmer needs to know whats new, therefore it will be easier to follow and quicker to read.
3. New Ti-Basic functions will be added so that a Ti-Basic programmer can use ASM-type commands.
Cons
1. Basic+ will take a little bit longer because I have to rewrite some of the code
2. QuickBasic will still be needed--Basic+ Ti-Basic programs cannot be written or debugged on a calculator
So, that's what the poll will be. Once again, could someone on this site make it so I can put the poll on this forum? Thanks! |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)
Joined: 25 Nov 2004 Posts: 3976
|
Posted: 19 Jan 2008 03:07:45 am Post subject: |
|
|
Poll added! Please read the above pros and cons before voting. |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 19 Jan 2008 09:37:58 pm Post subject: |
|
|
For everyone's informaton, Basic+ will be on hold for two days. I need people's votes as to whether to translate Ti-Basic code into ASM, or QBasic code into ASM.
This is the only poll that I will take for only two days. Why so short? I can't continue Basic+ until I know for sure what everybody wants. The reason is hard to explain.
So, please voice your opinion, I will continue work on Basic+ after Monday the 21st, which is when the poll will end.
Just a review of the poll instructions:
Quote: Here's something for everyone to think about, and that's where the poll is concerned. It might be easier for everybody if I translate TI-Basic code (instead of QuickBasic code) into ASM, the difference being that there would be several new subprograms (similar to Ti-Basic commands) that would include ASM functions, unlike previous Ti-Basic to ASM translators. Once again, the translation would make the program as fast, or almost as fast as, ASM, and QuickBasic would still be needed to debug and write programs.
Here are the pros and cons:
Pros
1. Hopefully everybody knows TI-Basic! It will be easier for everyone to work with, and easier for me to translate.
2. The documentation will be easier to follow. Instead of teaching a new language (QuickBasic), the documentation will simply teach what a Ti-Basic programmer needs to know whats new, therefore it will be easier to follow and quicker to read.
3. New Ti-Basic functions will be added so that a Ti-Basic programmer can use ASM-type commands.
Cons
1. Basic+ will take a little bit longer because I have to rewrite some of the code
2. QuickBasic will still be needed--Basic+ Ti-Basic programs cannot be written or debugged on a calculator |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 21 Jan 2008 10:39:15 am Post subject: |
|
|
Just a reminder that today until midnight is the last day for the poll. After that, I will continue work on Basic+.
But there's a change--I listed in the cons that Ti-Basic programs involving Basic+ could not be written or debugged on the calculator, but with the help of Xlib and Celtic III, I think I can actually implement this feature.
So there's another pro--even though QuickBasic programs require QuickBasic, Ti-Basic+ programs (with the additional subs to give them "ASM" features) can be written on the calculator.
REMEMBER: Just because Basic+ would convert Ti-Basic code if chosen, that doesn't mean that only Ti-Basic code will be converted. There will be pre-written calculator subs that allow ASM functions (such as AppVar writing, Sprites, etc.) that Basic+ will convert.
Last edited by Guest on 21 Jan 2008 10:51:29 am; edited 1 time in total |
|
Back to top |
|
|
WikiGuru ADOS (Attention deficit... Oh! Shiny!)
Elite
Joined: 15 Sep 2005 Posts: 923
|
Posted: 21 Jan 2008 11:10:31 am Post subject: |
|
|
I'd say no to TI-Basic because that really will actually hinder someone's ability to program z80, and it might lead to a mis-match of sorts where a person would start programming q-basic like z80 and somehow mix in TI-basic. It'd be hard to translate and confusing to a programmer because of the mixing of two very different syntax's. |
|
Back to top |
|
|
Rebma Boss
Member
Joined: 16 Dec 2007 Posts: 116
|
Posted: 21 Jan 2008 11:46:00 am Post subject: |
|
|
Quote: I'd say no to TI-Basic because that really will actually hinder someone's ability to program z80
Just remember that this is not meant for anyone who wants to learn or program z80--it's meant for people who are having trouble learning z80, or don't have time to program z80.
Quote: It might lead to a mis-match of sorts where a person would start programming q-basic like z80 and somehow mix in TI-basic. It'd be hard to translate and confusing to a programmer because of the mixing of two very different syntax's.
Tha't correct, which is why there would be, at most, ten Qbasic-syntax commands. The rest of the syntax would be in TI-Basic style. In other words, there would be very little mixing, and I'm making sure nobody would be confused by it. |
|
Back to top |
|
|
|