![Photo](/uploads/av-95.gif?_r=1172795666)
Basic Extender & Problems
#1
Posted 13 March 2004 - 09:28 AM
It seems that sometimes the calc crashes after the CBE was installed and
this still happens after reboot. Sometimes noting helps and I've to do
a memory reset (test menu / - Memory) and sometimes even directly after
this the calc still crashes.
Is there anyone who is willing to test wether this is caused by the CBE (what I don't believe)
or a Problem of my calc?
What is the menuitem "Cycle Test" in the test mode?
I executed it and it said sometimes after half an hour sometimes after 1 hour
that "Flash Test Failed". Sometimes this does not happen.
The Flash test from the test mode runs fine. (Shows OK)
Is there anyone who also had those problems? Have you any idea what the reason for this is?
It even appers to happen if the CBE was not installed into memory after a compelte reset at all.
Please help me!!!!
#2
Posted 13 March 2004 - 11:07 AM
If this problem is software you could have created the first virus on afx
![:lol2:](/dot/public/style_emoticons/default/lol2.gif)
(persistant code? personnalized boot?!)
sometimes it crash... but when you're doing nothing, it crash?
hmm
try to modify all interrupt with a program of your own (in begining, point them at nothing)
#3
Posted 13 March 2004 - 12:09 PM
What exacly happens when the calc crashes? What is the calc doing at this moment?
#4
Posted 13 March 2004 - 01:03 PM
installed NOTHING on it and calced 7.2*2.45 and it crashed!!! Also sometimes when
drawing graphs.
Pointing all ints at nothing? This results in crash!!!
Use the P button? Damn what do you think rebooting is? I said I rebooted
it and it happens even after reset.
I don't want to install the app on my other calc until i'm COMPLETELY sure
that this is not cause by the program in ANY way.
When I used flash cycle the last time (2 hours) it worked the whole time without
displaing any error ... then I aborted it. Can I test it this is caused by a
non-working flash? If yes how?
#5
Posted 13 March 2004 - 06:56 PM
it and it happens even after reset."
Roe said that Hidden Menu's reboot and P button's reboot are a bit different.
"calced 7.2*2.45 and it crashed" same crash when we try to put a menu from a different rom!
I don't think that flash is really damaged...
hmmm try to initialize the rom ( with Service(+) on hidden menu)... even if it is stupid (a lot of casio's stuff on AFX is stupid, so...)
(hu? i tried to do the 'Sector access' in the Flash menu. I pressed 'P' button. After the reboot, I got a DATA ERROR 40, So I type EXE, and the calc said that Storage Memory has been reseted. But the whole flash is intact, even the menu...)
#6
Posted 13 March 2004 - 07:27 PM
1) But i used the P button after the first crash (no other way to continue and it didn't work afterwards. Strange ...Roe said that Hidden Menu's reboot and P button's reboot are a bit different.
"calced 7.2*2.45 and it crashed" same crash when we try to put a menu from a different rom!
2) So this might be cause by failures on drive A or by failurs in the reset system?
anyways ... I'll continue development on this calc.
#7
Posted 20 March 2004 - 06:49 PM
for quite a long time now ...). I told you of the problems I had with my AFX?
They didn't happen again but now I tried my FX one week ago and
placed the batteries in it and turned it on and ... it rebooted ...
then I wanted to do some easy calculations ... and it rebooted. Either the
screen would fill itsself with freaky patterns or the calc would simply freeze.
I only wanted to calc 21+23+18.8 and divide this by 3 and it didn't work.
Now you'd say that this is caused by a prog ...
Well it isn't. On this calc has only been CNC instaleld (for multi player testing)
and never anything else that does change OS things like interrupts.
I only had TOUCHE on it and this for sure doesn't cause such problems.
I don't know what to do. I initialized it and it didn't help. I rebooted it
in all possible ways and it didn't work. The problem is that I'm gonna write
an important test in my Mathematics advanced course where I need the FX 1.0
since I'm not allowed to use an AFX. But it crashes !!! I don't know what to do!
Do you have any suggestions? Might uploading an SYSTEM drive image
of the ones found on the internet help?
PLEASE HELP ME!!!
#8
Posted 21 March 2004 - 11:13 AM
#9
Posted 21 March 2004 - 12:40 PM
the rom anyways since I don't want to open it to avoide voiding my warranty.
#10
Posted 21 March 2004 - 03:01 PM
Note that removing new installed add-in language (like polish, transfered by the exe probram from PC not by selecting it on the calc from memnu) by erasing memory is difficult too. So I suggest that you send a language pack and use different methods of erasing memory till this installed language will be removed.
You can also try to cause a transfer error (by for example altering system disk at different offsets) to force memory initialization ("Data error nn, pres
![<span class=](/dot/public/style_emoticons/default/EXE.jpg)
I bet that this can be recovered.
Good luck,
Roeoender.
#11
Posted 21 March 2004 - 03:52 PM
I already got these data errors from alone.
I can't even select menu items some times. Not even the transfer menu.
Then after I let the calc some minutes or hours it would
let me choose the menus again but crash soon afterwards.
I had errrors 20 / 40 and 7C (standard data error) and after reset and some calulcations they
appeared again.
#12
Posted 21 March 2004 - 04:51 PM
Explain your problem and ask if they could lend you a similiar calc
just for the exams (just as a "replacement" car when your own had an accident).
If they won't agree you can post a request at some of your local comuunity forum
that you give some money for lending AFX 1.0 for 1 day.
The cycle test just does all test from the sequence, I think.
There simply may be a mechanical damage (as you say about those flash error)
to your flash that cause this errors.
You can also try to use GComm or Touche (or something( to erase all flash disks one by one. You can also write an asm program that would zero all bytes of RAM memory and put this program at the end of the 256Kb of RAM - sequence of machine code instructions poked directly to RAM and than jmp to this code.
There is no magick if those two methods fail than there is a problem with hardware.
Roeoender.
#13
Posted 21 March 2004 - 07:01 PM
(enter random informatik every ~500 bytes).
It seems to work. Made some basic calcs and entered all menus without crashs.
Maybe it helped.
I'll lend an CFX 9850GB+ from a friend since me and my friend are the only
ones in town who own an FX 1.0+ since schools do only recommend 9850's for the pupils.
Since he has exams the same day he can't gieve me his 1.0+ ... sadly
![:)](/dot/public/style_emoticons/default/smile.png)
So I'll have 2 calcs for my exam and I hope the other one won't get
infected from my 1.0+ (I hope it doesn't spread though air)
![:thumbsup:](/dot/public/style_emoticons/default/thumbs_up.gif)
![:greengrin:](/dot/public/style_emoticons/default/greengrin.gif)
While going through these errors I noticed that there are quite many and that
I don't know where they come from. Maybe we could make a list
with how to reproduce them (if possible).
I had:
20 / 40 / 7C / 70 / 60 / 58
Anyone had ever other errors (not math errors and this stuff!)
Thank you a lot for your help roe. The flash test of the memory menu does always say
OK. So it seems to be no flash error. Maybe I'll try the memory reset program.
Thanks once more! Huhn
#14
Posted 21 March 2004 - 09:12 PM
#15
Posted 22 March 2004 - 03:01 PM
#16
Posted 16 April 2004 - 07:11 AM
But I need some help. I wan't the Basic extender to have a plugin interface but
for this i need a possibility to call another executable from withing a TSR but when
I try I get an "out of memory" error from the DOs interrupt. I know that
I need to free some memory blocks so that the new program has space and
I know how to do that for an ordinary program but how do I do it for a TSR?
There must be some possibility to execute a program from within a TSR.
If anybody knows it would really help me.
As an alternative someone could also explain me how to link and compile
a C function in a way that it can be used in an ASM program.
Thank you guys! huhn
PS: I decided to go with crimsons suggestion and do the
#ECHO Hallo
command like style. It makes things easier for coders because only few would learn
the cryptic commands I intended to use before. This also enables me to pass
parameters directly without accessing the BASIC vaiables.
But I wan't the parsers to be in extra programs because the whole things should
never take up more than 10KB in ram so that the BASIC interperter of the CASIO
and other programs can still run well.
#17
Posted 16 April 2004 - 07:57 PM
![:)](/dot/public/style_emoticons/default/smile.png)
I have another idea about the check for the extender: on the first line check for a comment (') that reads:
'BASIC EXTENDER CHECK
then if found skip the second line and set the variable theta to -12345 (or some other number as long as its easy to remember)
demo code:
'BASIC EXTENDER CHECK 0->o if o<>-12345 then "BASIC EXTENDER NOT FOUND!" Stop IfEnd
#18
Posted 17 April 2004 - 07:33 AM
commands that are outputted to the screen (but it suppresses the actuall output of course).
I need someone with C & ASM knowledge:
I wan't to link a C and a ASM program together in order to use the SHELL function of
C in my asm program. This are the sourcecodes:
C:
#include <dos.h> #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <process.h> extern char *filename; extern main(); int execute() { system("dir"); //filename); getch(); return 0; }
ASM:
.186 .MODEL TINY locals @@ .DATA tst db 0 .STACK 256 .CODE extrn _execute : near public _main _main: MOV AX,_DATA MOV DS,AX call _execute MOV AH,4Ch INT 21h end _main
The compiling/assembling works fine.
The problem is the linking.
I try to link with TCC (from the CDK) and the folowing syntax:
TCC -L..\lib -edir1.exe dir1.obj bae.obj
where dir1.obj is the assembled ASM file and bae.obj is the compiled
C file. I get the error:
Undefined symbol _export in module dir1.asm
I need this for the plugin interface since I know no other way to
call a program from within a TSR.
Would be nice if someone could help me,
#19
Posted 17 April 2004 - 03:28 PM
#20
Posted 17 April 2004 - 04:11 PM
Know that the system() function cannot work on the AFX because there is never enough memory, I don't remember if I tried with a very small C prog but I think it won't work.
![:(](/dot/public/style_emoticons/default/sad.png)
#21
Posted 18 April 2004 - 08:37 AM
using TSRs with TC seemd quite complicated for me and
when I tried the DOS exec function it said not enough memory what is normal
since I have to free some but don't know how to do it from within a TSR.
Thats bad. But I can't write the CBE without the plugin interface.
(it would only include Portaccess / Memory acces / Interrupt access but no other
advanced functions like sprite drawing and file handling.
#22
Posted 18 April 2004 - 02:44 PM
C code:
#include <stdio.h> /* Zmienne globalne zdefiniowane w C: */ char CGlobal='!'; char CTextGlobal [20]="Poczatkowy tekst"; /* Zmienne globalne zdefiniowane w ASM: */ extern char AGlobal; /* funkcje zdefiniowane w ASM: */ extern void asm_func (long int BigNum, char chara, int number, char tab [], int *numP); void main (void) { int numb=32000; char tab [100]; printf ("\nNumb przed uruchomieniem funkcji: %x.\n",numb); asm_func (0x12345678,'J',0x0902,tab,&numb); printf ("\nNumb:%x\nAGlobal:%i\n",numb,AGlobal); printf ("tab: %s\n",tab); printf ("CTextGlobal: %s",CTextGlobal); }
ASM code:
PUBLIC _asm_func PUBLIC _AGlobal ASSUME CS:_TEXT,DS:_DATA ; ; w konwencji jezyka C STRUKTURE odpowiadajaca sytuacji na stosie zaraz po ; wywolaniu danej funkcji buduje sie nastepujaca: BP,IP i potem kolejne ; zmienne w kolejnosci wystepowania w prototypie funkcji, pomimo, ze ; na stos te zmienne sa wrzucane w odwrotnej kolejnosci, zwroc uwage na ; zmienna chara oraz na tablice i wskazniki ; asm_funcS STRUC dw ? ;bp;+0 dw ? ;ip;+2 BigNum dd ? ;+4 chara db ? ;+8 db ? ;+9 number dw ? ;+10 tab dw ? ;+12 numP dw ? ;+14 asm_funcS ENDS _DATA SEGMENT word PUBLIC 'DATA' _AGlobal db 113 EXTRN _CGlobal:BYTE;To jest global zdefiniowany w C EXTRN _CTextGlobal:BYTE;To jest tablica _DATA ENDS _TEXT SEGMENT word PUBLIC 'CODE' ; asm_func (BigNum,chara,number,tab,numP); _asm_func PROC near push bp mov bp,sp ;*** *** *** BIGNUM *** *** ***: cmp word PTR [bp].BigNum+2,1234h;cmp BigNum 12345678h jne go_on ; | cmp word PTR [bp].BigNum,5678h; | jne go_on ; | ; \ / mov dl,'A' ;rowne to wyswietl 'A' mov ah,02 int 21h go_on: ;*** *** *** CHARA *** *** ***: cmp [bp].chara,'J' ; cmp chara 'J' jne go_on1 ; | mov dl,'B' ; \ / mov ah,02h ;rowne to wyswietl 'B' int 21h go_on1: ;*** *** *** NUMBER *** *** ***: cmp [bp].number,1902h jne go_on2 mov dl,'C' mov ah,02h int 21h go_on2: ;*** *** *** TAB *** *** ***: mov di,[bp].tab ;wypelnij tablice mov byte PTR [di],'J' mov byte PTR [di]+1,'a' mov byte PTR [di]+2,'r' mov byte PTR [di]+3,'e' mov byte PTR [di]+4,'k' mov byte PTR [di]+5,0 ;*** *** *** numP *** *** ***: ; gdy numP wskazywa? na liczbe == 32000 ; to ta liczba zostanie zmieniona na 0x1023 mov di,[bp].numP cmp [di],32000 jne go_on3 mov [di],1023h mov dl,'D' mov ah,02h int 21h go_on3: ;*** *** *** C_GLOBAL *** *** ***: cmp _CGlobal,'!' jne go_on9 mov dl,'Z' mov ah,02 int 21h go_on9: ;*** *** *** C_TEXT_GLOBAL *** *** ***: mov _CTextGlobal,'K' ;pierwszy znak globala ;teraz jest == 'K' pop bp ret _asm_func ENDP _TEXT ENDS END
Make file
uruchom.exe : main.obj asmmod.obj tlink -Ld:\prog\bc\lib c0s.obj main.obj + asmmod.obj, \ uruchom.exe,, cs.lib del *.obj main.obj : main.c bcc -c main.c asmmod.obj : asmmod.asm cls tasm asmmod.asm
important stuff:
- adding underscodes before function names
- linking with c0s.obj and cs.lib (s means 'small model' other letters for other models) the order of linking is important.
- I used borland C/C++ 3.1 but porobably TC 2.01 or something works the same way.
- I bet there is much stuff about it in internet. There was some kind of SWAG (Pascal) version for C which used asm a lot.
Some other quick tips:
- in BC 3.1 there is included full source of all standard functions so you can look at sources for functions like 'system' or 'exec' but they aren't that easy as you could expect.
- for some strange reason execXX function worked for me only when string buffers were long (I use 200byte). I really don't know why.
- for your basic extension - you can put ASM procedures that obtain arguments through registers or memory buffer, those functions would be put at fixed position in the calc's mem and you extender would only interpret parts of the program that call those functions and then make far jmp to proc.
Sorry but I didn't have time to read the whole thread. And wrote it in a hurry.
Roeoender.
Edited by CrimsonCasio, 18 April 2004 - 07:25 PM.
#23
Posted 18 April 2004 - 03:21 PM
![:)](/dot/public/style_emoticons/default/smile.png)
Sadly I don't have permission to edit previous post. Some mod/admin could correct it.
CC: Done.
#24
Posted 18 April 2004 - 04:00 PM
TASM automatically prefixes the names with underscores
#25
Posted 18 April 2004 - 04:32 PM
And this is the reason why you have to do it manually when calling those functions in your program. This was the reason of: "Undefined symbol _export in module dir1.asm".TASM automatically prefixes the names with underscores
Roeoender.
#26
Posted 19 April 2004 - 04:53 AM
2) I don't want to
include an ASM function ito C code but a C function into ASM code (so
that the ASM program is the main program.
Anyways some of the tips might proove usefull. I'll try this afternoon.
#27
Posted 19 April 2004 - 07:20 AM
#28
Posted 19 April 2004 - 01:49 PM
Sadly I couldn't find my code for this direction, but as I have wrote there should be examples somewhere on the web (or discussion groups). It is even possible to use Pascal functions (compiled to objs) in your C programs.
Roeoender.
#29
Posted 22 April 2004 - 04:40 PM
Just a theory:
Could I make a TSR installer that copies the TSR code into a basic file and point the interrupt to the addresse of that basic file in ram? That would save a lot user ram and
would let me get arround this difficult calling thing. It would also speed things up.
So just for theorie: Is it possible? If yes I'll try to write it.
#30
Posted 22 April 2004 - 05:09 PM
Pointing to flash disk mapped to memory isn't good too as you still need some place for variables (maybe you can use stack for dynamic vars but you won't have any "globals" then), for simple functions that only use registers for I/O using flash mem would be good enough. Someone could make a multipurpose Casio library to save programs size this way.
Roeoender.
#31
Posted 22 April 2004 - 05:22 PM
they won't ever move .... I think ... I'll simply try it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users