# LoCode 5/5

``` BBS: Inland Empire Archive
Date: 01-04-56 (01:04)             Number: 1470
From: BRENT ASHLEY                 Refer#: NONE
To: ALLAN ZACHARY                 Recvd: NO
Subj: LoCode 5/5                     Conf: (2) Quik_Bas```
```(Continued from the previous message)

Temp\$ = SPACE\$(3)

' extract four input bytes
i = INSTR(CharSet, MID\$(Byte4\$, 1, 1)) - 1
j = INSTR(CharSet, MID\$(Byte4\$, 2, 1)) - 1
k = INSTR(CharSet, MID\$(Byte4\$, 3, 1)) - 1
l = INSTR(CharSet, MID\$(Byte4\$, 4, 1)) - 1

' build three output bytes
MID\$(Temp\$, 3, 1) = CHR\$((k AND 3) * 64 + l)
MID\$(Temp\$, 2, 1) = CHR\$((j AND &HF) * 16 + (k \ 4))
MID\$(Temp\$, 1, 1) = CHR\$((i * 4) + (j \ &H10))

' return ascii string
Decode\$ = Temp\$

END FUNCTION

SUB ProgressMeter (Row, Col, freq)
' displays progress meter at row, col, updating
' meter once every (freq)
STATIC Spokes\$, Counter, Skip
' only assign first time through
IF NOT LEN(Spokes\$) THEN Spokes\$ = "\|/-"

Skip = (Skip + 1) MOD freq
IF Skip = 0 THEN
LOCATE Row, Col
PRINT "["; MID\$(Spokes\$, Counter + 1, 1); "]";
Counter = (Counter + 1) MOD 4
END IF
END SUB
___
X DeLuxe2 1.12 #10383 X

--- Maximus 2.00
* Origin: Durham Systems (ONLINE!) (1:229/110)
```

Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET