1726
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to. 1727
Grammer / Re: Grammer 2-The APP« on: April 30, 2012, 11:54:58 am »
hehe, thanks
![]() @Sorunome: If I were to include all that, I would just have one giant app like DoorsCS7 ![]() 1728
Grammer / Re: Find the error in a beginner's program« on: April 30, 2012, 11:46:34 am »
Okay, I believe the problem is just that you have :expr(Input →AC' Input will not normally handle numbers >65535
![]() Code: [Select] :.0: ;This line gets ignored because it starts with "." By the way, it looks nice o.o 1729
Grammer / Re: Grammer 2-The APP« on: April 30, 2012, 11:33:16 am »If you know the assembly code to run an app, then yes, you can actually run an app from Grammer. I never even thought about that because it is complicated to do in Assembly. To run assembly programs, use Asm( and to run hex codes, use AsmPrgm. To execute an App, you want to use AsmPrgm. Be warned that this will exit the program and not return: Code: [Select] .0: This will leave garbage on the screen in some cases, just as a warning. Also, if the App name does not work, try adding spaces until their are 8 chars. For example, Axe is really named"Axe " 1730
News / Re: United-TI merges with Cemetech. CasioKingdom becomes Casio-Scene.« on: April 30, 2012, 07:41:21 am »
Wow, that stuff is neat
![]() 1731
Grammer / Re: Latest Grammer Updates« on: April 29, 2012, 11:04:11 pm »
Version 2.29.04.12
I have rewritten the readme, added in support for the menu options, and modified some commands. I tried fixing bugs like the fact that length( wasn't returning what it was supposed to. I also made more arguments optional for certain functions like the sprite and circle commands. Any comments or suggestions can go in the appropriate topic ![]() 1732
ASM / Re: Bit Math« on: April 29, 2012, 01:36:44 pm »
Yes, Z80 Bits does indeed have some useful routines in there to look at
![]() Oh, and so to do 2-byte multiplication, you can simply change the counter to 16, and then the input registers to 16-bit ones?Yep ![]() As for division, here is a routine: Code: [Select] HL_Div_C: Luckily, division is pretty simple compared to multiplication. DEHL/C is much easier than DEHL*C. ![]() 1733
ASM / Re: Bit Math« on: April 29, 2012, 12:35:12 pm »
Hmm, it doesn't look quite right if you are trying to multiply registers. I don't know if this will help you?
Code: [Select] Basically, this works like regular multiplication that you would do by hand. Since the above code is using 8-bit registers, there are 8 digits per number. Since bits are only 1 or 0, we only have to multiply by one or zero. Then we just add the result to the accumulator. When we get ready to add the next multiplication, we need to shift the accumulator left. In Decimal, we do this by multiplying by ten (tacking on a zero at the end). In binary, we multiply by 2. I hope this helps?As for division, the algorithm is actually very similar and uses long division like you learned in grade school, except with binary. Say you have 37/5. In binary, you are doing: 00100101/101. so you shift the 00100101 and move the overflow into another register. Pretend I have done this 5 times already: 0000010010100000 Now you see, the overflow is not greater than 5, so shift once more: 0000100101000000 Now it is, so we get tricky. First, subtract five from the overflow and increment the other number by 1: 0000010001000001 Now shift again: 0000100010000010 Now it is greater than 5 again, so: 0000001110000011 Shift again: 00000011100000110 And do the proper adjustment: 00000001000000111 Now look at that o_O You have the remainder as 2 and the division is 7. Note that in all, there were 8 shifts. I hope this helps! If you want a division code, feel free to ask ![]() 1734
Grammer / Re: Grammer 2-The APP« on: April 29, 2012, 12:07:20 pm »
If I can do it, I plan to let Grammer do some hook chaining to allow it to be a little more compatible with the others
![]() 1735
Grammer / Re: Grammer 2-The APP« on: April 29, 2012, 12:01:52 pm »
I am currently working on it
![]() 1736
Grammer / Re: Grammer 2-The APP« on: April 29, 2012, 11:47:04 am »
Okay, I have been working on this for the past two hours and I now have the main menu working better
![]() Gram-When this is highlighted, it only displays programs with a Grammer header AppV-When this is highlighted, it shows appvars instead of programs Asm-When this is highlighted, it shows assembly programs. There is a Grammer header for assembly programs, too, just like there are MirageOS programs and ION programs. Exit-Exits the app Hook-Currently, this toggles the token hook on and off Caution: Any program run from this menu is run as a Grammer program or Asm program. So, again, to summarize: -You can now run Grammer Asm programs and regular ASM programs from Grammer (The screenshot shows a program I made with Axe) -You can run a program as a Grammer program, even if it doesn't have the header -You can toggle the Token hook on or off -You can look at the program list or appvar list in case you converted your programs to appvars Also, there are now 655 bytes left, but there is code that I still need to remove. EDIT: Also, I have been working at cleaning up the readme+tutorial and I am trying to document all of the calls in the jump table so that Assembly programmers can start making Grammer Asm programs. 1737
ASM / Re: The User Program Variable« on: April 28, 2012, 10:40:48 pm »
If you want to edit the first byte, you can try this:
Code: [Select] ld hl,NAME If you want to see more complicated code that edits the first byte of the second line:Code: [Select] ld hl,NAME
1738
Grammer / Re: Grammer 3-Concepts, ideas, requests« on: April 28, 2012, 01:51:06 pm »
Oh, you are right, it is only one page o_O
1739
Grammer / Re: Grammer 2-The APP« on: April 28, 2012, 10:42:13 am »
Ah, okay
![]() ![]() 1740
Grammer / Re: Grammer 3-Concepts, ideas, requests« on: April 28, 2012, 10:31:13 am »
Yes, for Grammer 3, I will make sure to have a good readme
![]() EDIT: Yeong asked about adding a menu hook in Grammer 3 and that reminded me about some of the other menu features that I think would be awesome. Since Grammer 3 won't be using the OS menu system, I will definitely be adding a way to make a customisable MenuKey that works like my MenuKeyHook. I will also make it easy for the user to add in extra, customisable menus, too. Also, since I plan to have custom command sets, I will probably leave the F1 to F4 keys as changing menus depending on what command sets you have loaded. F5 will probably be the custom menu. |
|