Wednesday, May 20, 2020

Disassmbler now in flash PROGMEM

Running out of nano memory in RAM, only 2K bytes so rewrote 1802 disassembler so that all the disassembly information is in flash ROM.
Here's the side-program that disassembles 1802 hex codes;
https://pastebin.com/nVu7iVYz

New lines used look like this:
const char flashHiNib3[] PROGMEM = {"[00idl.][01ldn.L[10inc.L[20dec.L[30br.N[31bq.N[32bz.N[33bdf.N[34b1.N[35b2.N[36b3.N[37b4.N[38skp.][39bnq.N[3Abnz.N[3Bbnf.N[3Cbn1.N[3Dbn2.N[3Ebn3.N[3Fbn4.N[40lda.L[50str.L [60irx.L[61out.L[69inp.L[70ret.]abcd[71dis.][72ldxa.][73stxd][74adc.][75sdb.][76shrc.][77smb.][78sav.][79mark.][7Aseq.][7Breq.][7Caddi.N[7Dsdbi.N[7Eshlc.][7Fsmbi.N[80glo.L[90ghi.L[A0plo.L[B0phi.L[C0lbr.T[C1lbq.T[C2lbz.T[C3lbdf.T[C4nop.][C5lsnq.][C6lsnz.][C7lsnf.][C8lskp.][C9lbnq.T[CAlbnz.T[CBlbnf.T[CClsie.][CDlsq.][CElsz.][CFlsdf.][D0sep.L[E0sex.L[F0ldx.][F1or.][F2and.][F3xor.][F4add.][F5sd.][F6shr.][F7sm.][F8ldi.N[F9ori.N[FAani.N[FBxri.N[FCadi.N[FDsdi.N[FEshl.][FFsmi.N"}; //};

and..

 Serial.println(F("All ready? "));

Got whole disassembler plus a few helper routines and sample data down to about 209 bytes.

No comments:

Post a Comment

Pi Pico and other Boards

 Got a new Pi Pico and it looks very promising. Want to use Oled display with it.