Show Posts

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.


Messages - Xeda112358

Pages: 1 ... 180 181 [182] 183 184 ... 317
2716
TI Z80 / Re: asmdream is waking up...
« on: December 13, 2011, 07:19:46 pm »
Wait, ASCII to tokens or tokens to ASCII?

2717
TI Z80 / Re: ASMComp
« on: December 13, 2011, 04:08:16 pm »
:D My issue was that I programmed in hex a lot, but I figured automating the process of computing labels would make my life easier XD. Then I thought "What about other people using this?" And then I added commenting (still not reinstated), equate support, and text conversion.

2718
TI Z80 / Re: asmdream is waking up...
« on: December 13, 2011, 07:36:04 am »
I know I just took all of what I considered the most common equates and put it into one file and had the user define their own equates if they needed (and they could create their own). If you split it up into 5 files or whatever, will they be by some category?

2719
TI Z80 / Re: polygon-based 3D engine (with textures)
« on: December 12, 2011, 06:57:04 pm »
Now, I'll just use this threat as a project thread.
Oh dear, there is no need to threaten O.O
Freudian slip? :P

2720
ASM / Re: ASM Optimized routines
« on: December 12, 2011, 03:50:27 pm »
Yes, this was truly awesome getting to witness live amazingness while I also tried to create the same routine O.O My attempt was extremely ugly compared to this :) Beautiful code, Runer112

2721
ASM / Re: 24 bit multiplication
« on: December 12, 2011, 02:48:12 pm »
16-bit subtraction
Code: [Select]
or a     ;to make sure the c flag is reset. Not always necessary if you know the c flag will be reset
sbc hl,bc  ;you can do sbc hl,de also.
32-bit addition (you mean two 32-bit inputs?)
Code: [Select]
;Inputs:
;     HLBC is one of the 32-bit inputs
;     DE points to the other 32-bit input in RAM
;Outputs:
;     HLBC is the 32-bit result
;     DE is incremented 3 times
;     A=H
;     c flag is set if there is an overflow
     ld a,(de) \ inc de
     add a,c \ ld c,a
     ld a,(de) \ inc de
     adc a,b \ ld b,a
     ld a,(de) \ inc de
     adc a,l \ ld l,a
     ld a,(de)
     adc a,h \ ld h,a
     ret
Squaring and square rooting... I will think on it D:

Also, I am working on a mini math library that will include RAM based math (so all the values will be in RAM). It seems like a few of these commands will need to rely on some memory. If they do, I suggest using the OP registers (11 bytes of RAM each).

2722
Cool, that looks like it will be useful, though I don't know anything computer-wise XD

Also, your grammar and syntax are great :) What is your native language? Also, Welcome to Omnimaga!

2723
Grammer / Re: Grammer 2-The APP
« on: December 12, 2011, 12:23:23 pm »
Oh, the LD was just purely data. I used the inString( command to search the data for a match. So if you abuse this, you could make a compiler! :D

2724
Grammer / Re: Grammer 2-The APP
« on: December 12, 2011, 09:57:50 am »
fwahahaha >:D I was showing off the fact that using this command, you can make a compiler in Grammer code :devil:

2725
TI Z80 / Re: [discontinued] polygon-based 3D engine (with textures)
« on: December 11, 2011, 08:57:53 pm »
I think there is a reason why jacobly has an average of more than 1 uprate per 2 posts O.O Good eye.

2726
TI Z80 / Re: asmdream is waking up...
« on: December 11, 2011, 05:59:26 pm »
It is one of the Lovely Sequences :3

(I call them Lovely Sequences, I don't think anybody else does...)

But yeah, Kerm seems to have made a decent job of accessing the Goto option without making the user go through the OS menu. Though, of course, that could be a hook, now that I think about it x.x

2727
TI Z80 / Re: asmdream is waking up...
« on: December 11, 2011, 03:05:32 pm »
That's okay, I have been looking at the code that is run when you actually press "Goto"  and I am trying to see if there is a bcall that matches it. Maybe ask ThePenguin77 or KermM? I know DoorsCS has its own custom error routine and then lets you jump to the offending error.

2728
ASM / Re: 24 bit multiplication
« on: December 11, 2011, 02:30:16 pm »
So with two-byte multiplication, you can take advantage of the fact that add hl,hl is the same as shifting hl left. It even gives you the carry! So in this case:
Code: [Select]
     ld hl,0
     ld a,16
MultLoop:
     add hl,hl      ;shifts hl left
     rl e \ rl d    ;shifts de left and if hl overflowed, it overflows into de
     jr nc,$+6      ;if the bit in DE is o, skip this chunk
       add hl,bc    ;add bc to hl (think of this as the first number)
       jr nc,$+3    ;overflow into de
         inc de
     dec a
     jr nz,MultLoop
     ret
That will multiply DE times BC and return the result in DEHL. I will see if I can port a square root routine for 32-bit...

EDIT: changed inc e to inc de

2729
ASM / Re: 24 bit multiplication
« on: December 11, 2011, 01:07:43 pm »
Yes :) Typically you do rla, then check the next bit and if it is set, add the other register :)

The rla at the beginning works because a starts at 0 so 0*0=0.

2730
ASM / Re: 24 bit multiplication
« on: December 11, 2011, 11:55:42 am »
Hmm, here is the algorithm in decimal:
Code: [Select]
333
x471
----
1) 4*333
   +Acc  = 1332
   Acc*10= 13320
2) 7*333
   +Acc  = 15651
   Acc*10= 156510
3) 1*333
   +Acc  = 156843
Here is the algorithm in binary:
Code: [Select]
00100110
x11011001
---------------
1) 1x00100110
     +Acc = 00100110
     Acc*2= 01001100
2) 1x00100110
     +Acc = 01001100+00100110=01110010
     Acc*2= 11100100
3) 0x00100110
     +Acc = 11100100
     Acc*2= 111001000
4) 1x00100110
     +Acc = 111101110
     Acc*2= 1111011100
5) 1x00100110
     +Acc = 10000000010
     Acc*2= 100000000100
6) 0x00100110
     +Acc = 100000000100
     Acc*2= 1000000001000
7) 0x00100110
     +Acc = 1000000001000
     Acc*2= 10000000010000
8) 1x00100110
     +Acc = 10000000110110

Pages: 1 ... 180 181 [182] 183 184 ... 317