Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| lgp30:samples [2018-01-15 13:52] – fixed var count 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' | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | data area: | ||
| + | ; | ||
| + | , | ||
| + | 20 00000400' | ||
| + | 21 00002700' | ||
| + | 22 0000ww00' | ||
| + | 23 00000200' | ||
| + | |||
| + | start here: | ||
| + | .zzz0800' | ||
| + | </ | ||
| + | ===== Fill and clear a track ===== | ||
| - | print 10 digits | + | 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. |
| - | xz0000' | + | < |
| - | xp1600' CR | + | fill and clear a track in physical order |
| - | xz0000' | + | ;zzz0400' |
| - | 04 xp0200' print 0 | + | /zzz0400' |
| - | xz0000' | + | 00 c0033' |
| - | b0004' last printed | + | c0033' |
| - | e0022' | + | 02 b0033' |
| - | | + | a0032' |
| - | y0004' save | + | y0005' |
| - | s0021' end? | + | 05 hzzzz' |
| - | t0004' no | + | a0034' |
| - | 12 xz0400' stop for repeat | + | e0035' |
| - | b0023' | + | h0033' |
| - | y0004' start over | + | s0036' |
| - | u0000' | + | t0012' |
| - | data area: | + | u0002' |
| - | ;zzz0820' | + | 12 z0400' |
| - | ,zzz0004' | + | c0033' |
| - | 20 00000400' | + | c0033' |
| - | 21 00002700' | + | 15 b0033' |
| - | 22 0000ww00' | + | a0032' |
| - | 23 00000200' | + | y0019' |
| - | start here: | + | c0037' |
| - | .zzz0800' | + | 19 |
| + | b0033' | ||
| + | a0034' | ||
| + | e0035' | ||
| + | h0033' | ||
| + | | ||
| + | t0027' | ||
| + | u0015' | ||
| + | 27 | ||
| + | u0000' | ||
| + | data area: | ||
| + | ; | ||
| + | , | ||
| + | 32 00002100' | ||
| + | 33 00000000' | ||
| + | 34 000000q4' | ||
| + | 35 000000wj' | ||
| + | 36 00000002' | ||
| + | 37 00000000' | ||
| + | start here: | ||
| + | .zzz0400' | ||
| + | </ | ||
