Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape17b_acorn_eu_1990_december.wav » R.DecPats

R.DecPats

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape17b_acorn_eu_1990_december.wav
Filename: R.DecPats
Read OK:
File size: 04A3 bytes
Load address: FFFF1A00
Exec address: FFFF8023
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10REM Patterns from decimals
   20REM by Jonathan Hart
   30REM (c) The Micro User
   40REM December 1990
   50MODE 4:INPUT "Scale: "scale
   60IF scale>20 THEN 50
   70PROCassemble
   80INPUT "Start co-ords: "ox,oy
   90INPUT "Fraction (eg: 1/2): "a$
  100CLS:VDU 23,1,0;0;0;0;
  110i%=INSTR(a$,"/"):IF i%=0 THEN 90
  120r%=VAL LEFT$(a$,i%-1)
  130x%=VAL MID$(a$,i%+1)
  140IF r%>=10*x% THEN 140
  150$&700="Key 1 "+a$
  160X%=0:Y%=7:CALL cli
  170?dir=0:MOVE ox,oy
  180VDU 31,39,0,&30+(r% DIV x%),8
  190r%=r% MOD x%*10:A%=&2E
  200CALL print:REPEAT:A%=r% DIV x%
  210CALL draw:r%=r% MOD x%*10
  220UNTIL r%=0:A%=&30:REPEAT
  230CALL print:UNTIL FALSE
  240DEFPROCassemble:dir=&70:fx=&FFF4
  250length=&71:wrch=&FFEE:cli=&FFF7
  260FOR I%=0 TO 2 STEP 2:P%=&900
  270[OPT I%:.draw STA add+1
  280ORA #&30:JSR print:INC dir
  290LDX #scale:LDA #0:CLC
  300.add ADC #&00:DEX:BNE add
  310.times4 ASL A:ASL A:BNE P%+3:RTS
  320STA length:LDA #25:JSR wrch
  330LDA #1:JSR wrch:STA eor+1
  340JSR plot:DEC eor+1
  350.plot LDA dir
  360.eor EOR #&00:LSR A:BCC zero
  370LSR A:LDA length:LDY #0
  380BCC P%+7:SBC #1:EOR #&FF:DEY
  390JSR wrch:TYA:JMP wrch
  400.zero LDA #0:JSR wrch:JMP wrch
  410.print PHA:LDA #19:JSR fx:LDX #0
  420.shift1:LDA &5808,X
  430STA &5800,X:INX:BNE shift1
  440.shift2 LDA &5908,X:STA &5900,X
  450INX:CPX #&38:BCC shift2
  460PLA:JSR wrch:LDA #8:JMP wrch
  470]:NEXT:ENDPROC

� Patterns from decimals
� by Jonathan Hart
� (c) The Micro User
(� December 1990
2� 4:� "Scale: "scale
<� scale>20 � �Tr@
F
�assemble
P� "Start co-ords: "ox,oy
Z� "Fraction (eg: 1/2): "a$
d�:� 23,1,0;0;0;0;
ni%=�a$,"/"):� i%=0 � �DZ@
xr%=� �a$,i%-1)
�x%=� �a$,i%+1)
�� r%>=10*x% � �tL@
�$&700="Key 1 "+a$
�X%=0:Y%=7:� cli
�?dir=0:� ox,oy
�� 31,39,0,&30+(r% � x%),8
�r%=r% � x%*10:A%=&2E
�� print:�:A%=r% � x%
�� draw:r%=r% � x%*10
�� r%=0:A%=&30:�
�� print:� �
���assemble:dir=&70:fx=&FFF4
�#length=&71:wrch=&FFEE:cli=&FFF7
� I%=0 � 2 � 2:P%=&900
PT I%:.draw STA add+1
�A #&30:JSR print:INC dir
"LDX #scale:LDA #0:CLC
,.add ADC #&00:DEX:BNE add
6$.times4 ASL A:ASL A:BNE P%+3:RTS
@STA length:LDA #25:JSR wrch
JLDA #1:JSR wrch:STA eor+1
TJSR plot:DEC eor+1
^.plot LDA dir
h.eor � #&00:LSR A:BCC zero
rLSR A:LDA length:LDY #0
|BCC P%+7:SBC #1:� #&FF:DEY
�JSR wrch:TYA:JMP wrch
�".zero LDA #0:JSR wrch:JMP wrch
�$.print PHA:LDA #19:JSR fx:LDX #0
�.shift1:LDA &5808,X
�STA &5800,X:INX:BNE shift1
�#.shift2 LDA &5908,X:STA &5900,X
�INX:CPX #&38:BCC shift2
� PLA:JSR wrch:LDA #8:JMP wrch
�	]:�:�
�
00000000  0d 00 0a 1c f4 20 50 61  74 74 65 72 6e 73 20 66  |..... Patterns f|
00000010  72 6f 6d 20 64 65 63 69  6d 61 6c 73 0d 00 14 16  |rom decimals....|
00000020  f4 20 62 79 20 4a 6f 6e  61 74 68 61 6e 20 48 61  |. by Jonathan Ha|
00000030  72 74 0d 00 1e 18 f4 20  28 63 29 20 54 68 65 20  |rt..... (c) The |
00000040  4d 69 63 72 6f 20 55 73  65 72 0d 00 28 13 f4 20  |Micro User..(.. |
00000050  44 65 63 65 6d 62 65 72  20 31 39 39 30 0d 00 32  |December 1990..2|
00000060  18 eb 20 34 3a e8 20 22  53 63 61 6c 65 3a 20 22  |.. 4:. "Scale: "|
00000070  73 63 61 6c 65 0d 00 3c  15 e7 20 73 63 61 6c 65  |scale..<.. scale|
00000080  3e 32 30 20 8c 20 8d 54  72 40 0d 00 46 0d f2 61  |>20 . .Tr@..F..a|
00000090  73 73 65 6d 62 6c 65 0d  00 50 1c e8 20 22 53 74  |ssemble..P.. "St|
000000a0  61 72 74 20 63 6f 2d 6f  72 64 73 3a 20 22 6f 78  |art co-ords: "ox|
000000b0  2c 6f 79 0d 00 5a 1e e8  20 22 46 72 61 63 74 69  |,oy..Z.. "Fracti|
000000c0  6f 6e 20 28 65 67 3a 20  31 2f 32 29 3a 20 22 61  |on (eg: 1/2): "a|
000000d0  24 0d 00 64 15 db 3a ef  20 32 33 2c 31 2c 30 3b  |$..d..:. 23,1,0;|
000000e0  30 3b 30 3b 30 3b 0d 00  6e 1d 69 25 3d a7 61 24  |0;0;0;..n.i%=.a$|
000000f0  2c 22 2f 22 29 3a e7 20  69 25 3d 30 20 8c 20 8d  |,"/"):. i%=0 . .|
00000100  44 5a 40 0d 00 78 12 72  25 3d bb 20 c0 61 24 2c  |DZ@..x.r%=. .a$,|
00000110  69 25 2d 31 29 0d 00 82  12 78 25 3d bb 20 c1 61  |i%-1)....x%=. .a|
00000120  24 2c 69 25 2b 31 29 0d  00 8c 16 e7 20 72 25 3e  |$,i%+1)..... r%>|
00000130  3d 31 30 2a 78 25 20 8c  20 8d 74 4c 40 0d 00 96  |=10*x% . .tL@...|
00000140  15 24 26 37 30 30 3d 22  4b 65 79 20 31 20 22 2b  |.$&700="Key 1 "+|
00000150  61 24 0d 00 a0 13 58 25  3d 30 3a 59 25 3d 37 3a  |a$....X%=0:Y%=7:|
00000160  d6 20 63 6c 69 0d 00 aa  12 3f 64 69 72 3d 30 3a  |. cli....?dir=0:|
00000170  ec 20 6f 78 2c 6f 79 0d  00 b4 1d ef 20 33 31 2c  |. ox,oy..... 31,|
00000180  33 39 2c 30 2c 26 33 30  2b 28 72 25 20 81 20 78  |39,0,&30+(r% . x|
00000190  25 29 2c 38 0d 00 be 18  72 25 3d 72 25 20 83 20  |%),8....r%=r% . |
000001a0  78 25 2a 31 30 3a 41 25  3d 26 32 45 0d 00 c8 18  |x%*10:A%=&2E....|
000001b0  d6 20 70 72 69 6e 74 3a  f5 3a 41 25 3d 72 25 20  |. print:.:A%=r% |
000001c0  81 20 78 25 0d 00 d2 18  d6 20 64 72 61 77 3a 72  |. x%..... draw:r|
000001d0  25 3d 72 25 20 83 20 78  25 2a 31 30 0d 00 dc 13  |%=r% . x%*10....|
000001e0  fd 20 72 25 3d 30 3a 41  25 3d 26 33 30 3a f5 0d  |. r%=0:A%=&30:..|
000001f0  00 e6 0f d6 20 70 72 69  6e 74 3a fd 20 a3 0d 00  |.... print:. ...|
00000200  f0 1f dd f2 61 73 73 65  6d 62 6c 65 3a 64 69 72  |....assemble:dir|
00000210  3d 26 37 30 3a 66 78 3d  26 46 46 46 34 0d 00 fa  |=&70:fx=&FFF4...|
00000220  23 6c 65 6e 67 74 68 3d  26 37 31 3a 77 72 63 68  |#length=&71:wrch|
00000230  3d 26 46 46 45 45 3a 63  6c 69 3d 26 46 46 46 37  |=&FFEE:cli=&FFF7|
00000240  0d 01 04 1a e3 20 49 25  3d 30 20 b8 20 32 20 88  |..... I%=0 . 2 .|
00000250  20 32 3a 50 25 3d 26 39  30 30 0d 01 0e 1b 5b 4f  | 2:P%=&900....[O|
00000260  50 54 20 49 25 3a 2e 64  72 61 77 20 53 54 41 20  |PT I%:.draw STA |
00000270  61 64 64 2b 31 0d 01 18  1d 84 41 20 23 26 33 30  |add+1.....A #&30|
00000280  3a 4a 53 52 20 70 72 69  6e 74 3a 49 4e 43 20 64  |:JSR print:INC d|
00000290  69 72 0d 01 22 19 4c 44  58 20 23 73 63 61 6c 65  |ir..".LDX #scale|
000002a0  3a 4c 44 41 20 23 30 3a  43 4c 43 0d 01 2c 1d 2e  |:LDA #0:CLC..,..|
000002b0  61 64 64 20 41 44 43 20  23 26 30 30 3a 44 45 58  |add ADC #&00:DEX|
000002c0  3a 42 4e 45 20 61 64 64  0d 01 36 24 2e 74 69 6d  |:BNE add..6$.tim|
000002d0  65 73 34 20 41 53 4c 20  41 3a 41 53 4c 20 41 3a  |es4 ASL A:ASL A:|
000002e0  42 4e 45 20 50 25 2b 33  3a 52 54 53 0d 01 40 1f  |BNE P%+3:RTS..@.|
000002f0  53 54 41 20 6c 65 6e 67  74 68 3a 4c 44 41 20 23  |STA length:LDA #|
00000300  32 35 3a 4a 53 52 20 77  72 63 68 0d 01 4a 1d 4c  |25:JSR wrch..J.L|
00000310  44 41 20 23 31 3a 4a 53  52 20 77 72 63 68 3a 53  |DA #1:JSR wrch:S|
00000320  54 41 20 65 6f 72 2b 31  0d 01 54 16 4a 53 52 20  |TA eor+1..T.JSR |
00000330  70 6c 6f 74 3a 44 45 43  20 65 6f 72 2b 31 0d 01  |plot:DEC eor+1..|
00000340  5e 11 2e 70 6c 6f 74 20  4c 44 41 20 64 69 72 0d  |^..plot LDA dir.|
00000350  01 68 1e 2e 65 6f 72 20  82 20 23 26 30 30 3a 4c  |.h..eor . #&00:L|
00000360  53 52 20 41 3a 42 43 43  20 7a 65 72 6f 0d 01 72  |SR A:BCC zero..r|
00000370  1b 4c 53 52 20 41 3a 4c  44 41 20 6c 65 6e 67 74  |.LSR A:LDA lengt|
00000380  68 3a 4c 44 59 20 23 30  0d 01 7c 1e 42 43 43 20  |h:LDY #0..|.BCC |
00000390  50 25 2b 37 3a 53 42 43  20 23 31 3a 82 20 23 26  |P%+7:SBC #1:. #&|
000003a0  46 46 3a 44 45 59 0d 01  86 19 4a 53 52 20 77 72  |FF:DEY....JSR wr|
000003b0  63 68 3a 54 59 41 3a 4a  4d 50 20 77 72 63 68 0d  |ch:TYA:JMP wrch.|
000003c0  01 90 22 2e 7a 65 72 6f  20 4c 44 41 20 23 30 3a  |..".zero LDA #0:|
000003d0  4a 53 52 20 77 72 63 68  3a 4a 4d 50 20 77 72 63  |JSR wrch:JMP wrc|
000003e0  68 0d 01 9a 24 2e 70 72  69 6e 74 20 50 48 41 3a  |h...$.print PHA:|
000003f0  4c 44 41 20 23 31 39 3a  4a 53 52 20 66 78 3a 4c  |LDA #19:JSR fx:L|
00000400  44 58 20 23 30 0d 01 a4  17 2e 73 68 69 66 74 31  |DX #0.....shift1|
00000410  3a 4c 44 41 20 26 35 38  30 38 2c 58 0d 01 ae 1e  |:LDA &5808,X....|
00000420  53 54 41 20 26 35 38 30  30 2c 58 3a 49 4e 58 3a  |STA &5800,X:INX:|
00000430  42 4e 45 20 73 68 69 66  74 31 0d 01 b8 23 2e 73  |BNE shift1...#.s|
00000440  68 69 66 74 32 20 4c 44  41 20 26 35 39 30 38 2c  |hift2 LDA &5908,|
00000450  58 3a 53 54 41 20 26 35  39 30 30 2c 58 0d 01 c2  |X:STA &5900,X...|
00000460  1b 49 4e 58 3a 43 50 58  20 23 26 33 38 3a 42 43  |.INX:CPX #&38:BC|
00000470  43 20 73 68 69 66 74 32  0d 01 cc 20 50 4c 41 3a  |C shift2... PLA:|
00000480  4a 53 52 20 77 72 63 68  3a 4c 44 41 20 23 38 3a  |JSR wrch:LDA #8:|
00000490  4a 4d 50 20 77 72 63 68  0d 01 d6 09 5d 3a ed 3a  |JMP wrch....]:.:|
000004a0  e1 0d ff                                          |...|
000004a3
R.DecPats.m0
R.DecPats.m1
R.DecPats.m2
R.DecPats.m4
R.DecPats.m5