Skip to content

Commit

Permalink
new demo, ui
Browse files Browse the repository at this point in the history
  • Loading branch information
xem committed Jan 6, 2017
1 parent 0a2750a commit 3548bf5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Bonus:

- hello world
- xor pattern
- xor animated (and Esc support)
- xor pattern animated (supports Esc key)
- tunnel (with FPU instructions)

**sub-256b demos from Pouët:**
Expand Down
16 changes: 16 additions & 0 deletions src/demos.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,22 @@ ret ; assume [[FFEE]] = [0] = CD20 = int 20`;
disassemble();
}

// FIREWAVE
firewave.onclick = e => {
bytes = [196,28,144,170,17,249,24,216,230,66,230,97,36,68,255,230];
td_original.innerHTML = `<pre>les bx,[si] ; les ... miserables ^^
nop ; let's take a break and chill
stosb ; write something to the screen
adc cx,di ; things are adding up
sbb al,bl ; let's not get carried away
out 42h,al ; because 42 is *the* answer
out 61h,al ; always good to have another out
and al,44h ; may the fours be with you
jmp si ; the mack daddy makes ya!`;
cpu_mode = 32;
disassemble();
}

// DIROJED
dirojed.onclick = e => {
bytes = [176,19,205,16,197,31,56,15,16,39,107,219,229,138,15,2,9,2,143,191,254,2,72,63,75,228,96,254,200,117,231,195];
Expand Down
12 changes: 6 additions & 6 deletions src/disassembler.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
<title>Minix86 disassembler</title>

<h2>Mini x86 MS-DOS .COM disassembler</h2>
<br>
<br>
Demos:
<button id=hello>hello</button>
<button id=xor>xor</button>
<button id=xoranim>xor animated</button>
<button id=xoranim>xor2</button>
<button id=tunnel>tunnel</button>
<button id=m8trix>m8trix</button>
<button id=point16b>point16b</button>
<button id=firewave>firewave</button>
<button id=dragonfade>dragonfade</button>
<button id=dirojed>dirojed</button>
<button id=fr01>fr01</button>
Expand All @@ -23,8 +22,8 @@ <h2>Mini x86 MS-DOS .COM disassembler</h2>
<button id=puls>puls</button>
<button id=symetrie>symetrie</button>
<button id=quatro>quatro</button>
<button id=ms>motion sickness</button> or any file:
<input onchange="with(f=new FileReader)readAsArrayBuffer(files[0]),onload=u=>{u=new Uint8Array(f.result);if(u.length<=64*1024)d()}"type=file>
<button id=ms>motion sickness</button>
<!-- or <input onchange="with(f=new FileReader)readAsArrayBuffer(files[0]),onload=bytes=>{bytes=new Uint8Array(f.result);if(bytes.length<=64*1024)disassemble()}"type=file-->

<br>
<br>
Expand Down Expand Up @@ -137,9 +136,10 @@ <h2>Mini x86 MS-DOS .COM disassembler</h2>
//asm = asm.replace("r16/32",r16[r]);
}

// Else use a db instruction
// Else use a db instruction for all the next bytes
else {
asm = "db " + b16h(current_byte) + " ; '" + cp437[current_byte] + "'";
stop = 1;
}

// Separate mnemonic and operands
Expand Down

0 comments on commit 3548bf5

Please sign in to comment.