4004 emulator - jump into instruction?

Back to General discussions forum

GlideThestral     2015-11-12 01:00:10

I've tried to use old trick of jump to the second byte of 2-byte instruction (to save 1 byte & 1 cycle), like this:

jcn az xx1

...

db $28 ;; fim r8 ... instruction, used to skip next byte

xx1:

xch r0 ;; second byte of fim

...

but program gave wrong result.

Unfortunately I haven't time to investigate it now, so the question is: is it supposed to work and I made error somewhere or emulator doesn't support such tricks?

Rodion (admin)     2015-11-12 15:48:07
User avatar

> is it supposed to work

I'm sorry to say, but it is not. This emulator was created so that it executes literally list of instructions, mnemonics - so it do not convert them to real hex codes. It is my fault and to fix this we need the whole thing to be rewritten. Though I hope to do this in future.

Please login and solve 5 problems to be able to post at forum