Page 1 of 1

D.raw - simple drafting software - v2

Posted: Sat Feb 02, 2019 1:35 pm
by railwayman
Moderator note: code placed in code tags -- please consider doing this yourself in future!

Hi guys

A simple pixel drawing program, with the following features:
- GrMod selection
- Pixel size change on key press - 1x1 (÷), 2x2 (x), 3x3 (-), 4x4 (+)
- arrow UP to "lift a pen off the paper" or delete a pixel, arrow DOWN to "put a pen on the paper" or to turn on the drawing mode
- backspace key - wipe the screen
- keys 1-9 (except 5 which do nothing, but it's mapped as it can be accidently pressed) move the "pen" in 8 directions

Ps. V1 has been made for 42s, without pixel size change and graphic mode selection (included in HPmuseum library)

Code: Select all

00 { 194-Byte Prgm }
01▸LBL "Draw"
02 INPUT "GrMod"
03▸LBL "RESET"
04 CLLCD
05 1
06 ENTER
07 "×"
08 ASTO "PIX"
09▸LBL 10
10 CLA
11 ARCL "PIX"
12 AGRAPH
13 GETKEY
14 R↓
15 GTO IND ST T
16▸LBL 18
17 SF 34
18 GTO 10
19▸LBL 23
20 CF 34
21 GTO 10
22▸LBL 26
23 1
24 +
25 GTO 10
26▸LBL 24
27 1
28 -
29 GTO 10
30▸LBL 30
31 ISG ST Y
32 ABS
33 GTO 10
34▸LBL 20
35 DSE ST Y
36 ABS
37 GTO 10
38▸LBL 31
39 1
40 +
41 ISG ST Y
42 ABS
43 GTO 10
44▸LBL 29
45 1
46 -
47 ISG ST Y
48 ABS
49 GTO 10
50▸LBL 21
51 1
52 +
53 DSE ST Y
54 ABS
55 GTO 10
56▸LBL 19
57 1
58 -
59 DSE ST Y
60 ABS
61 GTO 10
62▸LBL 17
63 GTO "RESET"
64▸LBL 25
65 GTO 10
66▸LBL 32
67 "πππ"
68 ASTO "PIX"
69 GTO 10
70▸LBL 22
71 "×"
72 ASTO "PIX"
73 GTO 10
74▸LBL 37
75 "•••••"
76 ASTO "PIX"
77 GTO 10
78▸LBL 27
79 "∫∫"
80 ASTO "PIX"
81 GTO 10
82 .END.