12Me21
12Me21
85 / 3
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

  • 12Me21
    12Me21
    2nd Jun 2017
    (or passing multiple of the same immediate value/0 to any opcode)
  • 12Me21
    12Me21
    2nd Jun 2017
    Is not being able to do SEND 0,0 a bug in the assembler, or is it actually not possible?
  • TheMadEggMan
    TheMadEggMan
    2nd Jun 2017
    Sick :D
  • 12Me21
    12Me21
    2nd Jun 2017
    No, I just use the normal assembler. Anyway, I reduced the size of the program by 5 cells by avoiding immediate values. I'm not sure how much smaller it can get without doing something crazy like self modifying code.
  • LBPHacker
    LBPHacker
    2nd Jun 2017
    Hmm I meant AND + 0x1000. Anyway, manual fixed.
  • LBPHacker
    LBPHacker
    2nd Jun 2017
    Wait ... you program it with the PROP tool? ... Man you're tough.
  • LBPHacker
    LBPHacker
    2nd Jun 2017
    Hmm, right you are! It's actually CMP + 0x4000, which is a flag that tells the R1 to not store the result. Makes me wonder how many typos there are in the manual :P
  • 12Me21
    12Me21
    2nd Jun 2017
    I think there's a mistake in the documentation; It says TEST is [1100 01pp psss f..g] when it seems to actually be [1101 01pp psss f..g]
  • 12Me21
    12Me21
    2nd Jun 2017
    After it guesses correctly, you can press [resume] to play again.
  • danieldan0
    danieldan0
    2nd Jun 2017
    I like this! +1