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 - ben_g

Pages: 1 ... 63 64 [65] 66 67 ... 71
961
News / Re: The Future of Calculators
« on: June 09, 2011, 02:32:34 pm »
This is great! You've earned a +1 respect!

962
ASM / Re: Compile Time error, what is wrong?
« on: June 08, 2011, 03:10:29 pm »
sub always substracts from a, so it does only need the register to substract from a

EDIT: ah, nevermind, Runer has already answered that (I was 19 secounds to late)

963
ASM / Re: an other assembly question
« on: June 08, 2011, 03:07:31 pm »
I remember one time when I was working on Pyoro I had the weirdest bug that seemingly occurred at random and couldn't be traced back anywhere.  It took me a week to find but eventually, I found it and fixed it.  I had forgotten to back up the ix register during my interrupt routine.  If you're using custom interrupts, make sure the routine is working right.

Another thought, is your program nearing 8kb in size?  Any code larger than that will cause a crash due to execution protection on the last page.  Try replacing the commented out part in your example with nops instead of the loads, I bet it has something to do with program size rather than the particular instructions.

Also, where are screenx and screeny?  You're not writing over any OS variables right?
I don't use custom interrupts. I turn interupts off at the beginning of my program, and turn them back on at the end of my program. I never had problems with this, so I don't see why it would give problems now.

Further, my program is only 2kb in size(on the calc), including a large LUT and a list of variables. Also, replacing the instructions with nops (even with a lot of them) doesn't let my program crash

screenx and screeny are variables defined in the program itself, so i'm not overwriting any OS vars.

I also tried to push ix at the beginning of my program, and pop it afterward. This didn't help either

964
ASM / Re: an other assembly question
« on: June 06, 2011, 04:00:49 pm »
0A18 is part of the OS, you want to try to figure out where execution leaves your code. Your code will be in the $9D95 - ~$B000 range depending on program size.

I put together everything you have posted so far and it ran fine. So I'm really not sure what isn't working right. It might not even be related to the code you posted.
Do you mean this could be a bug in latenite?

EDIT: an other assembler does just the same

965
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: June 06, 2011, 02:34:10 pm »
Thanks. It all works now

966
ASM / Re: an other assembly question
« on: June 06, 2011, 02:23:07 pm »
It crashed on adress 0A18, which is a jump instruction

btw, here's the code for the neg instructions:
Code: [Select]
NegHL:
xor a
sub l
ld l,a
sbc a,a
sub h
ld h,a
ret

NegBC:
xor a
sub c
ld c,a
sbc a,a
sub b
ld b,a
ret

NegDE:
xor a
sub e
ld e,a
sbc a,a
sub d
ld d,a
ret

967
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: June 05, 2011, 03:50:43 pm »
that one is corrupted too

968
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: June 05, 2011, 03:47:57 pm »
I did't mean the installer of ti-lp, i meant the installer of the gfm alone on ticalc (in the 'windows link software' category)

969
Miscellaneous / Re: Post your desktop
« on: June 05, 2011, 03:29:43 pm »
Why do you use the old theme?
becouse i don't know how to set the theme
Personalization Settings, accessed through Panel Control.
I think i'm going to keep it like this anyway.

btw i can't even find the personalisation settings.

970
Miscellaneous / Re: Post your desktop
« on: June 05, 2011, 03:26:16 pm »
Why do you use the old theme?
becouse i don't know how to set the theme

971
Miscellaneous / Re: Post your desktop
« on: June 05, 2011, 02:58:34 pm »
My desktop:

972
Other Calc-Related Projects and Ideas / Re: TILP: beta-testing...
« on: June 05, 2011, 02:46:04 pm »
Well, it does complain abouth that: (and yes, i already tried reinstalling)

973
ASM / Re: an other assembly question
« on: June 05, 2011, 02:37:56 pm »
Yes, that routine has a ret behind it, i just forgot to copy it.

MulFP looks like this:
Code: [Select]
MulFP:
  ;Multiplies 2 16bit fixed-point numbers
  ;IN: de, bc
  ;OUT: de * bc in hl
  ;DESTROYS: af, bc, de, hl
  bit 7, d
  jr nz, _MulFP_FirstNeg
  bit 7, b
  jr nz, _MulFP_AnsNeg
  jr z, _MulFP_AnsPos
_MulFP_FirstNeg:
  bit 7, b
  jr nz, _MulFP_AnsPos
_MulFP_AnsNeg:
  ld a, 1
  push af
  jr _MulFP_Cont
_MulFP_AnsPos:
  ld a, 0
  push af
_MulFP_Cont:
  bit 7, b
  jr z, _MulFP_BCPos
  call NegBC
_MulFP_BCPos:
  bit 7, d
  jr z, _MulFP_DEPos
  call NegDE
_MulFP_DEPos:
  call Mul16 
  ld l, h
  ld h, e
  pop af
  cp 1
  call z, NegHL
  ret
and it uses the Mul16 routine which looks like this:
Code: [Select]
Mul16:                           ; This routine performs the operation DEHL=BC*DE
  ld hl,0
  ld a,16
Mul16Loop:
  add hl,hl
  rl e
  rl d
  jp nc,NoMul16
  add hl,bc
  jp nc,NoMul16
  inc de
NoMul16:
  dec a
  jp nz,Mul16Loop
  ret

The only thing that i was able to find out while debugging was that it repeated some code over and over again. That was by repeating step by step. as soon as i click 'run', the calc crashes.
Further, i found out that when i call the routine twice, it doesn't clear the ram but ends the program.

974
ASM / Re: an other assembly question
« on: June 04, 2011, 07:38:12 pm »
it's a very simple routine:
Code: [Select]
SubFP:
  or a
  sbc hl, de

975
ASM / an other assembly question
« on: June 04, 2011, 07:33:52 pm »
I don't really get this:

Clears ramdoesn't clear the ram
Code: [Select]
  ld hl, (screenx)
  ld d, 1
  ld e, 0
  call SubFP
  ld b, h \ ld c, l
  ld de, 94
  call MulFP
  ld (screenx), hl
  ld hl, (screeny)
  ld d, 1
  ld e, 0
  call SubFP
  ld b, h \ ld c, l
  ld de, 62
  call MulFP
  ld (screeny), hl
  ret
Code: [Select]
  ld hl, (screenx)
  ;ld d, 1
  ;ld e, 0
  call SubFP
  ld b, h \ ld c, l
  ld de, 94
  call MulFP
  ld (screenx), hl
  ld hl, (screeny)
  ;ld d, 1
  ;ld e, 0
  call SubFP
  ld b, h \ ld c, l
  ld de, 62
  call MulFP
  ld (screeny), hl
  ret

In the left part, it clears the ram, while in the right part, it doesn't clear the ram while i have only comented out a few ld commands.

coul someone help please?

Pages: 1 ... 63 64 [65] 66 67 ... 71