I would love to help you out there Kybe and I understand what you code is trying to accomplish so far but what is the problem? As far as setting up "that adv stuff" I'm not sure what you mean.
Im Using the follow code for my calculator numpad.
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>run:
mov ebx,port0;
mov port1,eax;
cmp ebx,1
je add1;
cmp ebx,2
je add2;
cmp ebx,3
je add3;
cmp ebx,4
je add4;
cmp ebx,5
je add5;
cmp ebx,6
je add6;
cmp ebx,7
je add7;
cmp ebx,8
je add8;
cmp ebx,9
je add9;
cmp ebx,10
je add10;
jmp run;
add1:
mul eax,10;
add eax,1;
jmp run;
add2:
mul eax,10;
add eax,2;
jmp run;
add3:
mul eax,10;
add eax,3;
jmp run;
add4:
mul eax,10;
add eax,4;
jmp run;
add5:
mul eax,10;
add eax,5;
jmp run;
add6:
mul eax,10;
add eax,6;
jmp run;
add7:
mul eax,10;
add eax,7;
jmp run;
add8:
mul eax,10;
add eax,8;
jmp run;
add9:
mul eax,10;
add eax,9;
jmp run;
add10:
mul eax,10;
add eax,0;
jmp run;
</div>
If anyone could find bugs and how to set up that adv stuff... that would be great...
PS My steam name is 13lackM35a
PSS I <3 you!
I would love to help you out there Kybe and I understand what you code is trying to accomplish so far but what is the problem? As far as setting up "that adv stuff" I'm not sure what you mean.
...I wish I understood me.
How about:
Code:run: mov ebx,port0; // Two comparisons do the work of ten. cmp ebx,1; jl run;********// ebx <**1 - > do nothing cmp ebx,10;** jg run;********// ebx >**10 -> do nothing jl __add;******// ebx <**10 -> add ebx mov ebx,0;**** // ebx == 10 -> set ebx to 0 (add 0) jmp __add; mov port1,eax; // output after we've done our calculation, not before __add:******** // underscores added because we can't use 'add' for a label mul eax,10; add eax,ebx;** // simply add ebx, instead of several blocks adding constants. jmp run;
Oh wow, that looks a lot simpler. Im typing this from inside GMod using a GMod web browser FIREBOX FTW!
Bookmarks