Allow Adding to Ram or CU
This commit is contained in:
@ -162,7 +162,7 @@ button {
|
||||
|
||||
.pc .scroller table thead.head {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
top: -2px;
|
||||
left: 0;
|
||||
height: 1em;
|
||||
padding: 1em;
|
||||
@ -204,6 +204,16 @@ button {
|
||||
padding: 3px 15px;
|
||||
}
|
||||
|
||||
.pc .scroller table tbody button:last-child {
|
||||
text-decoration: none;
|
||||
text-transform: none;
|
||||
height: max-content;
|
||||
line-height: 2em;
|
||||
font-weight: normal;
|
||||
font-size: inherit;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
th.address {
|
||||
width: 5rem;
|
||||
padding-left: 8px;
|
||||
@ -278,10 +288,11 @@ th.address {
|
||||
|
||||
.pc .ram input[type=number] {
|
||||
margin: 0 .5em 0 0;
|
||||
padding: 1em .25em;
|
||||
background-color: var(--color-table-ram-select);
|
||||
color: var(--color-table-ram-select-text);
|
||||
border-color: var(--color-table-ram-select-border);
|
||||
height: max-content;
|
||||
height: 2.5em;
|
||||
}
|
||||
|
||||
.pc .ram input[type=number].instruction {
|
||||
@ -296,6 +307,12 @@ th.address {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.pc .ram .scroller table tbody button:last-child{
|
||||
background-color: var(--color-table-ram-select);
|
||||
color: var(--color-table-ram-select-text);
|
||||
border-color: var(--color-table-ram-select-border);
|
||||
}
|
||||
|
||||
|
||||
/* CONTROL UNIT */
|
||||
|
||||
@ -316,6 +333,12 @@ th.address {
|
||||
border: 1px solid var(--color-table-cu-select-border);
|
||||
}
|
||||
|
||||
.pc .cu .scroller table tbody button:last-child {
|
||||
background-color: var(--color-table-cu-select);
|
||||
color: var(--color-table-cu-select-text);
|
||||
border: 1px solid var(--color-table-cu-select-border);
|
||||
}
|
||||
|
||||
/* BUSSES */
|
||||
|
||||
.pc .databus,
|
||||
|
86
out/elm.js
86
out/elm.js
@ -5706,6 +5706,21 @@ var $author$project$Main$update = F2(
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgRamAddBelow':
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{
|
||||
ram: _Utils_ap(
|
||||
old_pc.ram,
|
||||
_List_fromArray(
|
||||
[0]))
|
||||
});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
case 'MsgCuEditAction':
|
||||
var addr = msg.a;
|
||||
var may_action = msg.b;
|
||||
@ -5721,6 +5736,17 @@ var $author$project$Main$update = F2(
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgCuAddBelow':
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{
|
||||
uCode: _Utils_ap(
|
||||
model.uCode,
|
||||
_List_fromArray(
|
||||
[$author$project$Main$ActNothing]))
|
||||
}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
default:
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
@ -5974,6 +6000,7 @@ var $elm$html$Html$table = _VirtualDom_node('table');
|
||||
var $elm$html$Html$th = _VirtualDom_node('th');
|
||||
var $elm$html$Html$thead = _VirtualDom_node('thead');
|
||||
var $elm$html$Html$tr = _VirtualDom_node('tr');
|
||||
var $author$project$Main$MsgCuAddBelow = {$: 'MsgCuAddBelow'};
|
||||
var $elm$core$Tuple$pair = F2(
|
||||
function (a, b) {
|
||||
return _Utils_Tuple2(a, b);
|
||||
@ -6069,7 +6096,34 @@ var $author$project$Main$viewCuUCodeContent = function (model) {
|
||||
return A2(
|
||||
$elm$html$Html$tbody,
|
||||
_List_Nil,
|
||||
A2($elm$core$List$map, list2table, indexedList));
|
||||
_Utils_ap(
|
||||
A2($elm$core$List$map, list2table, indexedList),
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$tr,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
A2($elm$html$Html$td, _List_Nil, _List_Nil),
|
||||
A2(
|
||||
$elm$html$Html$td,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$button,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Events$onClick($author$project$Main$MsgCuAddBelow)
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Add Entry')
|
||||
]))
|
||||
]))
|
||||
]))
|
||||
])));
|
||||
};
|
||||
var $author$project$Main$viewCuUCode = function (model) {
|
||||
return A2(
|
||||
@ -6300,6 +6354,7 @@ var $author$project$Main$viewDataBus = function (model) {
|
||||
]))
|
||||
]));
|
||||
};
|
||||
var $author$project$Main$MsgRamAddBelow = {$: 'MsgRamAddBelow'};
|
||||
var $author$project$Main$MsgRamEditAddress = F2(
|
||||
function (a, b) {
|
||||
return {$: 'MsgRamEditAddress', a: a, b: b};
|
||||
@ -6413,7 +6468,34 @@ var $author$project$Main$viewRamContent = function (model) {
|
||||
return A2(
|
||||
$elm$html$Html$tbody,
|
||||
_List_Nil,
|
||||
A2($elm$core$List$map, ram2table, indexedRam));
|
||||
_Utils_ap(
|
||||
A2($elm$core$List$map, ram2table, indexedRam),
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$tr,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
A2($elm$html$Html$td, _List_Nil, _List_Nil),
|
||||
A2(
|
||||
$elm$html$Html$td,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$button,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Events$onClick($author$project$Main$MsgRamAddBelow)
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Add Entry')
|
||||
]))
|
||||
]))
|
||||
]))
|
||||
])));
|
||||
};
|
||||
var $author$project$Main$viewRam = function (model) {
|
||||
return A2(
|
||||
|
Reference in New Issue
Block a user