Continued adding 0

This commit is contained in:
Christian 2020-12-25 14:42:27 +01:00
parent 3af69db95a
commit de89a7b8fb
2 changed files with 20 additions and 22 deletions

View File

@ -6055,6 +6055,12 @@ var $author$project$Main$viewCuUCode = function (model) {
A2($elm$html$Html$Lazy$lazy, $author$project$Main$viewCuUCodeContent, model)
]));
};
var $author$project$Main$viewInstrEntry = function (i) {
var instruction = (i / 100000) | 0;
var address = i - (instruction * 100000);
return $elm$html$Html$text(
A2($author$project$Main$addLeadingZero, instruction, 3) + (' ' + A2($author$project$Main$addLeadingZero, address, 5)));
};
var $author$project$Main$viewCu = function (model) {
return A2(
$elm$html$Html$div,
@ -6146,7 +6152,15 @@ var $author$project$Main$viewCu = function (model) {
_List_fromArray(
[
$elm$html$Html$text(
'Programm Counter: ' + $elm$core$String$fromInt(model.pc.programmCounter))
'Programm Counter: ' + A2($author$project$Main$addLeadingZero, model.pc.programmCounter, 3))
])),
A2(
$elm$html$Html$p,
_List_Nil,
_List_fromArray(
[
$elm$html$Html$text('Instruction Register: '),
$author$project$Main$viewInstrEntry(model.pc.instructionReg)
])),
A2(
$elm$html$Html$p,
@ -6154,15 +6168,7 @@ var $author$project$Main$viewCu = function (model) {
_List_fromArray(
[
$elm$html$Html$text(
'Instruction Register: ' + $elm$core$String$fromInt(model.pc.instructionReg))
])),
A2(
$elm$html$Html$p,
_List_Nil,
_List_fromArray(
[
$elm$html$Html$text(
'µCode Counter: ' + $elm$core$String$fromInt(model.pc.uCounter))
'µCode Counter: ' + A2($author$project$Main$addLeadingZero, model.pc.uCounter, 4))
])),
A2(
$elm$html$Html$div,
@ -6236,12 +6242,6 @@ var $author$project$Main$viewDataBus = function (model) {
]))
]));
};
var $author$project$Main$viewInstrEntry = function (i) {
var instruction = (i / 100000) | 0;
var address = i - (instruction * 100000);
return $elm$html$Html$text(
A2($author$project$Main$addLeadingZero, instruction, 3) + (' ' + A2($author$project$Main$addLeadingZero, address, 5)));
};
var $author$project$Main$viewRamContent = function (model) {
var ram2table = function (entry) {
var val = entry.b;

View File

@ -395,19 +395,17 @@ viewCu model =
, p []
[ text
("Programm Counter: "
++ String.fromInt model.pc.programmCounter
++ addLeadingZero model.pc.programmCounter 3
)
]
, p []
[ text
("Instruction Register: "
++ String.fromInt model.pc.instructionReg
)
[ text "Instruction Register: "
, viewInstrEntry model.pc.instructionReg
]
, p []
[ text
("µCode Counter: "
++ String.fromInt model.pc.uCounter
++ addLeadingZero model.pc.uCounter 4
)
]
, div [ class "scroller" ]