Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| lgp30:samples [2018-01-15 12:02] – error in last program correctd rainer | lgp30:samples [2018-01-16 17:58] (aktuell) – [Fill and clear a track] rainer | ||
|---|---|---|---|
| Zeile 6: | Zeile 6: | ||
| As it is rather unusual that the machine stops on overflow, here is a small test program: | As it is rather unusual that the machine stops on overflow, here is a small test program: | ||
| - | + | < | |
| - | | + | halt on overflow |
| - | | + | ; |
| - | | + | / |
| - | | + | 00 |
| - | | + | 01 |
| - | u0001' | + | |
| - | | + | variables: |
| - | | + | ; |
| - | | + | , |
| - | | + | 16 7ww00000' |
| - | | + | 17 00002000' |
| - | | + | go |
| - | | + | .zzz0700' |
| + | </ | ||
| ===== Hello ===== | ===== Hello ===== | ||
| Zeile 51: | Zeile 51: | ||
| Example looping program that prints a given number of asterisks: | Example looping program that prints a given number of asterisks: | ||
| - | simple loop | + | < |
| - | | + | simple loop |
| - | | + | ; |
| - | | + | / |
| - | | + | 00 xp0800' |
| - | | + | xz0000' |
| - | | + | xp1600' |
| - | b0022' | + | xz0000' |
| - | u0007' | + | |
| - | | + | |
| - | | + | 06 |
| - | t0013' | + | 07 |
| - | h0020' | + | |
| - | | + | |
| - | | + | xp1000' |
| - | u0006' | + | xz0000' |
| - | | + | |
| - | | + | 13 xz0000' |
| - | | + | 14 |
| - | ; | + | |
| - | , | + | |
| - | 20 00000000' | + | |
| - | 21 00000010' | + | |
| - | 22 00000050' | + | |
| - | | + | |
| - | | + | |
| + | data: | ||
| + | ; | ||
| + | ,000 03' | ||
| + | 20 00000000' | ||
| + | 21 00000010' | ||
| + | 22 00000050' | ||
| + | start: | ||
| + | . | ||
| + | </ | ||
| ===== Printing all digits ===== | ===== Printing all digits ===== | ||
| The following example prints all characters in numerical sequence, all digits as an example. | The following example prints all characters in numerical sequence, all digits as an example. | ||
| It shows how to modify instructions: | It shows how to modify instructions: | ||
| + | < | ||
| + | ; | ||
| + | / | ||
| + | 00 xp0400' | ||
| + | xz0000' | ||
| + | xp1600' | ||
| + | xz0000' | ||
| + | 04 xp0200' | ||
| + | xz0000' | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 12 xz0400' | ||
| + | | ||
| + | | ||
| + | | ||
| - | print 10 digits | + | data area: |
| - | | + | ;zzz0820' |
| - | /zzz0800' | + | ,zzz0004' |
| - | 00 xp0400' lower case | + | 20 00000400' |
| - | xz0000' | + | 21 00002700' last digit 9 = x26, plus 1 |
| - | | + | 22 0000ww00' mask |
| - | | + | 23 00000200' |
| - | | + | |
| - | | + | |
| - | b0004' | + | |
| - | e0022' | + | |
| - | | + | |
| - | y0004' | + | |
| - | s0021' | + | |
| - | t0004' | + | |
| - | | + | |
| - | b0023' | + | |
| - | y0004' | + | |
| - | u0000' | + | |
| - | data area: | + | start here: |
| - | ;zzz0820' | + | .zzz0800' |
| - | , | + | </ |
| - | 20 00000400' | + | ===== Fill and clear a track ===== |
| - | 21 00002700' | + | |
| - | 22 0000ww00' | + | |
| - | 23 00000200' | + | |
| - | start here: | + | Fills a track with its sector numbers, and then clears the same track again. |
| - | | + | To fill in physical order, use '' |
| + | If Break 4 is not set, the programme waits before clear; | ||
| + | if Break 8 is not set, it waits after clear before repeat. | ||
| + | < | ||
| + | fill and clear a track in physical order | ||
| + | ; | ||
| + | / | ||
| + | 00 | ||
| + | | ||
| + | 02 | ||
| + | | ||
| + | | ||
| + | 05 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 12 | ||
| + | | ||
| + | | ||
| + | 15 | ||
| + | | ||
| + | | ||
| + | | ||
| + | 19 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 27 | ||
| + | u0000' | ||
| + | data area: | ||
| + | ; | ||
| + | , | ||
| + | 32 00002100' | ||
| + | 33 00000000' | ||
| + | 34 000000q4' | ||
| + | 35 000000wj' | ||
| + | 36 00000002' | ||
| + | 37 00000000' | ||
| + | start here: | ||
| + | .zzz0400' | ||
| + | </ | ||
