diff options
author | Erich Eckner <git@eckner.net> | 2015-10-20 12:30:45 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2015-10-20 12:30:45 +0200 |
commit | d3d4a62a392954ff8199b7cb4b7a155fb9eab915 (patch) | |
tree | ef265fb4c982422d71eb0372872a066833062eed | |
parent | 8f2a34f475d6847874f3ac8952d138a559ac520e (diff) | |
download | units-d3d4a62a392954ff8199b7cb4b7a155fb9eab915.tar.xz |
gibAlleBefehle neu in irdecoderunit.pas
-rw-r--r-- | irdecoderunit.pas | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/irdecoderunit.pas b/irdecoderunit.pas index edf981c..c9917a7 100644 --- a/irdecoderunit.pas +++ b/irdecoderunit.pas @@ -32,6 +32,7 @@ type destructor destroy; override; function zeileVerarbeitet: boolean; function befehlVerarbeitet: boolean; + function gibAlleBefehle: string; end; tBefehl = record @@ -183,5 +184,21 @@ begin dec(eingabeLaenge); end; +function tIRDecoder.gibAlleBefehle: string; +var + bw: tBefehlsWort; + lw: longword; + b1,b2: boolean; +begin + result:=''; + for bw:=low(tBefehlsWort) to high(tBefehlsWort) do begin + lw:=zeichenTabelle[bw]; + lw:=((lw and not 1) shl 1) or byte(odd(lw)); + for b1:=false to true do + for b2:=false to true do + result:=result+base64Encode(lw or (byte(b1) shl 1) or (byte(b2) shl 4),3)+#10; + end; +end; + end. |