File tree 5 files changed +40
-3
lines changed
5 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 38
38
font-weight : bold;
39
39
}
40
40
41
+ .e-decimal {
42
+ color : # 00BBDD ;
43
+ font-weight : bold;
44
+ }
45
+
41
46
.e-valid-char {
42
47
color : # AA00FF ;
43
48
font-weight : bold;
Original file line number Diff line number Diff line change 2
2
Styles for periphery device related stuff.
3
3
*/
4
4
5
- # octalDisplay {
5
+ # octalDisplay , # joystick {
6
6
width : 121px ;
7
7
margin-top : 5px ;
8
8
margin-left : 5px ;
9
9
}
10
10
11
+ # octJoystick {
12
+ display : inline-block;
13
+ }
14
+
11
15
# octalDisplay .displayContainer {
12
16
background-color : # 000000 ;
13
17
margin : 5px auto;
23
27
background-image : url(../ _media/sevensegment.png);
24
28
}
25
29
30
+ # joystick .joystickContainer {
31
+ margin : 5px 5px ;
32
+ }
33
+
26
34
# dotMatrix {
27
35
width : 246px ;
28
36
margin-top : 5px ;
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ var Assembler = new function(){
59
59
if ( lines [ i ] [ l ] . substring ( 0 , 1 ) == "#" ) {
60
60
lines [ i ] [ l ] = binToOct ( lines [ i ] [ l ] . substring ( 1 , lines [ i ] [ l ] . length ) ) ;
61
61
}
62
+
63
+ // Values ending with . are decimal.
64
+ // Translate them to octal
65
+ if ( lines [ i ] [ l ] . substring ( lines [ i ] [ l ] . length - 1 , lines [ i ] [ l ] . length ) == "." ) {
66
+ lines [ i ] [ l ] = decToOct ( lines [ i ] [ l ] . substring ( 0 , lines [ i ] [ l ] . length - 1 ) ) ;
67
+ }
62
68
63
69
// Remove emtpy entries
64
70
if ( lines [ i ] [ l ] == "" ) {
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ function Editor(
79
79
}
80
80
} else if ( fragment . substring ( 0 , 1 ) == "#" ) { // Binary value
81
81
code [ c ] = '<span class="e-binary" title="Octal: ' + binToOct ( fragment ) + '">' + fragment + "</span>" ;
82
+ } else if ( fragment . substring ( fragment . length - 1 , fragment . length ) == "." ) { // Decimal value
83
+ code [ c ] = '<span class="e-decimal" title="Octal: ' + binToOct ( fragment ) + '">' + fragment + "</span>" ;
82
84
} else if ( / ^ ( [ 0 - 7 ] * ) $ / . test ( fragment ) === true && fragment . length > 0 ) { // Octal value
83
85
code [ c ] = '<span class="e-octal" title="Binary: ' + octToBin ( fragment ) + '">' + fragment + "</span>" ;
84
86
}
Original file line number Diff line number Diff line change @@ -320,13 +320,29 @@ <h2>Memory</h2>
320
320
< table id ="ramtable " class ="memtable ">
321
321
< tbody id ="ramtbody "> </ tbody >
322
322
</ table >
323
- </ div > < br /> < div id ="octalDisplay " class ="panel ">
323
+ </ div > < br /> < div id ="octJoystick " > < div id =" octalDisplay " class ="panel ">
324
324
< h2 title ="Device Address: 020 "> Oct Display</ h2 >
325
325
< div class ="displayContainer ">
326
326
< div class ="displaySegment " id ="displaySegment0 "> </ div > < div class ="displaySegment " id ="displaySegment1 "> </ div > < div class ="displaySegment " id ="displaySegment2 "> </ div >
327
327
</ div >
328
328
< span class ="peripheryDocs " onclick ="Control.showPopup('octalDisplayInfoPopup'); "> Docs</ span >
329
- </ div > < div id ="dotMatrix " class ="panel ">
329
+ </ div > < br /> < div id ="joystick " class ="panel ">
330
+ < h2 title ="Device Address: 050 "> Joystick</ h2 >
331
+ < div class ="joystickContainer ">
332
+ < table >
333
+ < tr >
334
+ < td > </ td > < td > < button > ^</ button > </ td > < td > </ td >
335
+ </ tr >
336
+ < tr >
337
+ < td > < button > <</ button > </ td > < td > < button > o</ button > </ td > < td > < button > ></ button > </ td >
338
+ </ tr >
339
+ < tr >
340
+ < td > </ td > < td > < button > v</ button > </ td > < td > </ td >
341
+ </ tr >
342
+ </ table >
343
+ </ div >
344
+ < span class ="peripheryDocs " onclick ="Control.showPopup('dotMatrixInfoPopup'); "> Docs</ span >
345
+ </ div > </ div > < div id ="dotMatrix " class ="panel ">
330
346
< h2 title ="Device Addresses: 030 - 034 "> Dot Matrix</ h2 >
331
347
< div class ="dotMatrixContainer ">
332
348
< canvas id ="dotMatrixCanvas " height ="160 " width ="160 "> </ canvas >
You can’t perform that action at this time.
0 commit comments