DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 DFS Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 DFS Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦53e28fa1c⟧ EM, TextFile

    Length: 1024 (0x400)
    Types: EM, TextFile
    Names: »COUNT_LEADING_ZEROS.EM«

Derivation

└─⟦b4205821b⟧ Bits:30000743 8mm tape, Rational 1000, DFS, D_12_7_3 SEQ288
    └─ ⟦this⟧ »COUNT_LEADING_ZEROS.EM« 
└─⟦b434774df⟧ Bits:30000528 8mm tape, Rational 1000, DFS, D_12_6_5
    └─ ⟦this⟧ »COUNT_LEADING_ZEROS.EM« 
└─⟦bc1274df5⟧ Bits:30000750 8mm tape, Rational 1000, DFS backup from PAM's R1000
    └─ ⟦this⟧ »COUNT_LEADING_ZEROS.EM« 

TextFile

[#eq %1% 0]40[else]

[set lz_count 0]
[set lz_arg %1%]

[#eq [rshift [var lz_arg] 20],0]
  [set lz_count [add 20 [var lz_count]]]
  [set lz_arg [lshift [var lz_arg] 20]]
[end]

[#eq [rshift [var lz_arg] 30],0]
  [set lz_count [add 10 [var lz_count]]]
  [set lz_arg [lshift [var lz_arg] 10]]
[end]

[#eq [rshift [var lz_arg] 38],0]
  [set lz_count [add 8 [var lz_count]]]
  [set lz_arg [lshift [var lz_arg] 8]]
[end]

[#eq [rshift [var lz_arg] 3C],0]
  [set lz_count [add 4 [var lz_count]]]
  [set lz_arg [lshift [var lz_arg] 4]]
[end]

[#eq [rshift [var lz_arg] 3E],0]
  [set lz_count [add 2 [var lz_count]]]
  [set lz_arg [lshift [var lz_arg] 2]]
[end]

[#eq [rshift [var lz_arg] 3F],0]
  [set lz_count [add 1 [var lz_count]]]
[end]

[var lz_count]
[kill lz_count]
[kill lz_arg]
[end]«nul»