Für dieses Forum muß Javascript im Browser aktiviert werden!
Kommentar: Einfügen von HTML im Kommentar: Link einfügen: <a href="LINKURL" target="_blank">LINKTITEL</a> Bild einfügen: <img src="BILDURL"> Text formatieren: <b>fetter Text</b> <i>kursiver Text</i> <u>unterstrichener Text</u> Kombinationen sind auch möglich z.B.: <b><i>fetter & kursiver Text</i></b> C2 Quellcode formatieren: <code>Quellcode</code> ASM Quellcode formatieren: <asm>Quellcode</asm> (Innerhalb eines Quellcodeabschnitts ist kein html möglich.) Wichtig: Bitte mache Zeilenumbrüche, bevor Du am rechten Rand des Eingabefeldes ankommst ! > Hello all CC2 speed freaks, > > I found a cure for the bug in the CC2's system.call() routine! After disassembling the os.hex file I found that when returning from the assembly code back to the C2 program, the return address on the stack points to the code used by system.jump() which causes the reboot. > By removing this address from the stack every thing works fine! > > You can now write assembly code to exploit the full speed of the CC2. If any one is interested I can post the disassembled and annotated version of the os.hex file to this forum. This allows you to see what the CC2 is doing when it is executing yor C2 program. > > An Example > ---------- > > Assemble following program using "a166 test.asm" and convert it into > a hex file with "ihex166 test.obj -o test.hex". Load the hex file > in the CC2. All tools and the file "reg164cl.def" are supplied on the CD. > > The program can be called from your program using: > system.call(3, 0) > > The sample code sets pin P1L.3 as an example: > > $CASE > $SEGMENTED > $MODEL(MEDIUM) > $EXTEND > $NOMOD166 > $STDNAMES(reg164cl.def) > > NAMETEST > > USERSEGSECTIONCODE WORD AT 30000H > > PUBLICTest > >