12Me21
1st Jun 2017
7th Jun 2017
reset: MOV bx,0 MOV dx,50001 MOV ex,0 loop: MOV ax,bx ADD ax,dx @noflags MOV cx,0 ADC cx,0 SHRD ax,cx,1 SEND 0,ax ADD ex,1 WAIT cx CMP cx,2 JA toohigh JB toolow SEND 0,ex HLT JMP reset toohigh: MOV dx,ax JMP loop toolow: MOV bx,ax JMP loop
r16k1s60
pressstart
memorydump
program
60hz
16bit
quiteuseless
pressenterlumage
Comments
-
Hmm, fail. That's send ax, ax. I meant 0x5000.
-
So yeah, my bad. But hey, there's a solution! Encode the opcode directly! "dw 0x5090"
-
Well yeah, but the assembler doesn't expect you to actually try doing so.
-
I could've sworn I read something like "Any instruction is capable of encoding a single immediate value and not more than that, which means that instructions such as mov [0xCAFE], 0xBABE are not possible to encode [unless the address and value to be written are the same, which is unlikely]"
-
I'd look into it but I'm totally out of context. I hate to say this but you should just try to avoid passing two immediates.
-
Well, maybe it's just not designed like that
-
I know you can only pass one immediate value, but you should be able to use it multiple times in a single instruction.
-
Yes, it is not possible to pass more than one immediate value, sadly. Did you read instruction reference?
-
Dude this is incredible...
-
Not all we need is negatives. :) Nice work, I can do simple games, but nothing like this. Happy to see that it can be done (I say this in almost every computer save I see) +x^2+2x+1