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 ... 246 247 [248] 249 250 ... 317
3706
« on: March 24, 2011, 10:59:09 am »
Multitasking would be difficult on a Z80... It can be done, but it would be slow and running two tasks would be slower than running each one separately
3707
« on: March 24, 2011, 10:47:14 am »
One reason for the trials is that back when TI was selling Apps, people wanted to release trial versions of their software. After the trials were used up, the app couldn't be used and the customer would need to buy the official version made with official software and with a special signature.
3708
« on: March 24, 2011, 10:40:55 am »
Oh, sorry about that Sometime I need to see what happens in other browsers
3709
« on: March 24, 2011, 10:38:44 am »
No, but I am pretty sure there is a GrBufClr or something of that nature. The reason this was include was because the code probably looked something like this:
GrBufClr: ld hl,plotSScreen BufClr: <<code>>
So it will smaller and the same speed to do bcall(_GrBufClr) than to do ld hl,plotSScreen \ bcall(_BufClr)
3710
« on: March 24, 2011, 10:30:55 am »
EDIT: As a note, the vertical and horizontal line commands draw across the whole screen The easiest horizontal line I could come up with... ;============================================ DrawHoriz: ;============================================ ;Input: ; l is the row to draw to ; a is the type of line to draw ; 0 is a white line ; 1 is a black line ; 2 is an inverted line ;============================================ ld h,0 ;2600 7 ld b,h ;44 4 ld c,l ;4D 4 add hl,bc ;09 11 add hl,bc ;09 11 add hl,hl ;29 11 add hl,hl ;29 11 ld bc,9340h ;014093 10 add hl,bc ;09 11 ld b,12 ;060C 7 or a ;B7 4 Total: 91 jr z,DrawHoriz ;2804 White: 12+318+91 dec a ;3C 4 jr nz,DrawInvH ;2006 Black: 4+4+7+7+318+91 dec a ;3C 4
DrawHoriz: Total: 5 bytes, 318 cycles ld (hl),a ;77 7 84 inc hl ;23 6 72 djnz DrawHoriz ;10FC 13*11+8 152 ret ;C9 10 10
DrawInv: Total: 7 bytes, 450 cycles Invert: 4+7+12+450+91 ld a,(hl) ;7E 7 84 cpl ;2F 4 48 ld (hl),a ;77 7 84 inc hl ;23 6 72 djnz DrawInv ;10FA 13*11+8 152 ret ;C9 10 10 ;============================================ ;Stats: ;============================================ ;Size: 33 bytes ;Speed: ; White: 12+318+91 421 cycles ; Black: 4+4+7+7+318+91 431 cycles ; Inv: 4+7+12+450+91 564 cycles ;============================================
Here is a vertical line: ;============================================ DrawVert: ;============================================ ;Inputs: ; a is the column ; c is the method ; 0 draws a white line ; 1 draws a black line ; 2 draws an inverted line ;============================================ ld b,a ;47 rrca \ rrca \ rrca ;0F0F0F and 1Fh ;E60F add 40h ;C640 ld l,a ;6F ld h,93h ;2693 ld a,b ;78 and 7 ;E607 inc a ;3C ld b,a ;47 ld a,1 ;3E01 GetPixelMask: rrca ;0F djnz GetPixelMask ;10FD
dec c ;0D jr nz,DrawVertW ;200F ld e,a ;5F ld bc,400Ch ;010C40 DrawVertBLoop: ld a,e ;7B or (hl) ;B6 ld (hl),a ;77 ld a,b ;78 ld b,0 ;0600 add hl,bc ;09 ld b,a ;47 djnz DrawVertBLoop ;10F6 ret ;C9 DrawVertW: dec c ;0D jr z,DrawVertI ;2001 cpl a ;2F DrawVertI: ld e,a ;5F ld bc,400Ch ;010C40 DrawVertILoop: ld a,e ;7B xor (hl) ;AE ld (hl),a ;77 ld a,b ;78 ld b,0 ;0600 add hl,bc ;09 ld b,a ;47 djnz DrawVertBLoop ;10F6 ret ;C9 ;============================================ ;Stats: ;============================================ ;Size: 58 bytes ;Speed: ... too lazy to calculate at the moment ; White: ; Black: ; Inv: ;============================================
Here is a pixel routine: ;============================================ PlotPixel: ;45 bytes ;============================================ ;Inputs: ; b is the x coordinate ; c is the y coordinate ; e is the method ; 0 draws a white line ; 1 draws a black line ; 2 draws an inverted line ;============================================ ld a,b ;78 ld b,0 ;0600 ld h,b ;60 ld l,c ;69 add hl,hl ;29 add hl,bc ;09 add hl,hl ;29 add hl,hl ;29 ld bc,9340h ;014093 add hl,bc ;09 ld b,a ;47 rrca ;0F rrca ;0F rrca ;0F and 1Fh ;E60F ld c,a ;4F ld a,b ;78 ld b,0 ;0600 add hl,bc ;09 and 7 ;E607 ld b,a ;47 inc b ;04 ld a,1 ;3E01 GetMask: rrca ;0F djnz GetMask ;10FD
dec e ;1D jr nz,DrawWPix ;2003 or (hl) ;B6 ld (hl),a ;77 ret ;C9 DrawWPix: dec e ;1D jr z,DrawIPix ;2801 cpl ;2F DrawIPix: xor (hl) ;AE ld (hl),a ;77 ret ;C9
These can probably be optimised, but I just typed them up I am fairly sure the last can be optimised more.
3711
« on: March 24, 2011, 09:13:34 am »
Or do you mean on the calc where you change what things like dim( or real( do?
3712
« on: March 23, 2011, 06:29:16 pm »
Yeah, but that takes so much more typing Actually, to make BatLib, I made a spreadsheet that converts all of my hex to .dw statements I feel like such a cheater, but it is much faster than using mnemonics (and I never get an error )
3713
« on: March 23, 2011, 06:23:13 pm »
Sorry, I have to do this... Anyway, I do that, too, sometimes. As for asking about game play suggestions, I think you can start it in other calc related projects and ask for suggestions there... not sure about that one...
3714
« on: March 23, 2011, 06:12:50 pm »
Plus, it's not much harder to just write ld h, 0 \ ld l, a and that way you know what is really going on.
Yeah, I kinda figured That's usually why I stick with 444D or 26006F or whatnot It's shorter than mnemonics... Actually, I wish that an assembler could do something like: ld hl,0 444D 2909292929
Or something and have it convert hex and mnemonics!
3715
« on: March 23, 2011, 12:28:10 pm »
Also, the If dim( was so that rand(15 wouldn't change Ans. Also, have you found any bugs?
That is really clever! I have never used that, but I normally don't need Ans by the time I get to a pause. As for optimisations, they have pretty much been covered edit: Also, I just noticed the msg number in the quote... 133771
3716
« on: March 23, 2011, 12:18:53 pm »
Just as a small spot of randomness, I have been working on a .TAB thing for TASM in case I ever get around to manually converting my programs to mnemonics... is it bad practice if I do things like making ld hl,bc or if I change FE00 to B7 and whatnot? I've always thought it would make source codes much easier to read with things like: ld hl,a (loads a into l and h=0) ld hl,bc cp hl,bc ld bc,(hl) And other random things like that I just define them in the actual .TAB file...
3717
« on: March 23, 2011, 12:09:22 pm »
I would store it to HL and use _DispHL:
ld hl,0 ld (CurRow),hl bcall(_getKey) ld l,a ld h,0 bcall(_DispHL) ret
3718
« on: March 23, 2011, 08:59:07 am »
You will want B_Call _ClrLCDFull. _BufClr clears 768 bytes of memory depending on where the pointer points it to.
3719
« on: March 23, 2011, 08:55:06 am »
Hmm, I'm not sure. I've made sound routines, but I've never figured this out. It is definitely something I would be interested in, too. It probably depends on how much power is being pumped through the serial port... not sure, sorry!
3720
« on: March 22, 2011, 04:22:15 pm »
Not necessarily, but most likely. If the shell executes the program the same way as the OS (likely by using one of the bcalls), then it wouldn't be a problem. Also, I am pretty sure that as long as the program is archived and there is no writeback, you won't need to worry.
Pages: 1 ... 246 247 [248] 249 250 ... 317
|