as: use pdp10_extint:uint{18,36}_to_ext/1

This commit is contained in:
Mikael Pettersson 2019-09-09 17:48:24 +02:00
parent a4d6d2ffff
commit c172f2df4b
2 changed files with 3 additions and 10 deletions

View File

@ -106,11 +106,7 @@ insn_image(Insn, Tunit) ->
((case At of true -> 1; false -> 0 end) bsl (36 - 14)) bor
((Index band ((1 bsl 4) - 1)) bsl (36 - 18)) bor
(Address band ((1 bsl 18) - 1))),
%% big-endian conversion
{ok, [(Word bsr 27) band 511,
(Word bsr 18) band 511,
(Word bsr 9) band 511,
Word band 511]};
{ok, pdp10_extint:uint36_to_ext(Word)};
{error, _Reason} = Error -> Error
end.

View File

@ -248,13 +248,10 @@ uint9_image(Uint9) ->
Uint9 band 511.
uint18_image(Uint18) ->
[(Uint18 bsr 9) band 511, Uint18 band 511].
pdp10_extint:uint18_to_ext(Uint18).
uint36_image(Uint36) ->
[(Uint36 bsr 27) band 511,
(Uint36 bsr 18) band 511,
(Uint36 bsr 9) band 511,
Uint36 band 511].
pdp10_extint:uint36_to_ext(Uint36).
image_size(Image) -> image_size(Image, 0).