-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCHANGES
658 lines (393 loc) · 17 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
-*- outline -*-
To understand the scope of these changes, please refer to the documentation.
* New in version 1.3
** Various
+ Use gforth 0.7.3 instead of gforth 0.6.x.
+ Use GPL v3 to follow gforth move.
* New in version 1.2.5
** New features
+ Make stack size configurable in multitasker. Feature requested
by David McNab <[email protected]>.
** New optimization
+ Use "subwf" when it leads to better code. Feature requested by
David McNab <[email protected]>.
** Bug fixes
+ Fix overflow in "goto" instruction patching in "multitasker.fs". Bug
reported and diagnosed by Alex Holden <[email protected]>.
+ Fix a bug involving dead code elimination and conditional branches.
Reported by Alex Holden <[email protected]>.
+ Fix a bug involving "exit" followed by "if". Reported by
Alex Holden <[email protected]>.
+ Fix a bug involving constant strings. Reported by Alex Holden
* New in version 1.2.4
** New words
+ Add the "flag" word from David McNab <[email protected]> which
handles 1-bit variables.
** New library
+ Add libroll.fs from David McNab <[email protected]>, which adds
the "roll" and "-roll" words.
** New optimization
+ When the return value is stored in W, use "retlw" to return. Implemented
after a question from David McNab <[email protected]>.
** Code and documentation enhancements
+ Import "return-in-w" into target vocabulary and document it. Suggested
by David McNab <[email protected]>.
+ Document the effect of "exit" in inlined words. Thanks to
Alex Holden <[email protected]> for asking for clarification.
** Bug fixes
+ Flash tables generated an error due to new nesting checks introduced in
PicForth 1.2.2. Reported by Jamie Lawson <[email protected]>.
+ Fix bug in macro processing where a word defined first in the
metacompiler then later in target mode (such as "suspend-interrupts"
when "picisr.fs" is included) was seen as the first definition in
macros. Reported by Alex Holden <[email protected]>.
+ Fix bug in multitasker when multiple code banks were involved.
Reported by Alex Holden <[email protected]>.
+ Fix bug in "resolve" when multiple code banks are involved.
Reported by Alex Holden <[email protected]>.
* New in version 1.2.3
** Bug fix
+ The "0 <" phrase (not "0<") could lead to incorrect result when
not followed by a conditional construct. Reported by
Alex Holden <[email protected]>.
+ Implement the "abs" word as documented in the manual.
+ The "dup 0<>" phrase was incorrect due to mowf not setting the "Z"
status bit. Reported by Alex Holden <[email protected]>.
* New in version 1.2.2
** New words
+ "case"/"of"/"endof"/"endcase". Suggested by David McNab
+ "write-map"/"write-dis". Implemented by
Alex Holden <[email protected]>.
** Enhancements
+ Check nesting of loops and conditional constructs as well as
non-nesting of definition words. Suggested by David McNab
+ Do not warn about words redefined in PicForth. Suggested by
Alex Holden <[email protected]>.
+ Output from "map" and "words" is now in low->high order not high->low.
Implemented by Alex Holden <[email protected]>.
** Bug fixes
+ Allow empty (but useless) code words
+ Fixed a slight stack leak in "words" and "map". Fix by
Alex Holden <[email protected]>.
+ Fixed a typo in "unsupported". Fix by Alex Holden <[email protected]>
* New in version 1.2.1
** Bug fixes
+ Fix a problem with "adjust-bank". Reported by David McNab
* New in version 1.2
** Optimizations
+ "nip" now optimizes code such as "1 2 nip" by replacing it by "2".
This situation can arise when a bit name is given and only the
bit number is interesting.
** Enhancements
+ "picisr.fs" now include versions of "suspend-interrupts" and
"restore-interrupts" that can be nested up to 256 levels. However
this requires one more byte of memory (problem signaled by
Alex Holden <[email protected]>).
+ PicForth will issue warnings (which by default are fatal) when a
bank mismatch has been detected.
** Cleanups
+ Remove extra definition of "set-wrt". Reported by Jamie Lawson
** Bug fixes
+ Interrupts were not properly suspended during an EEPROM write. This
has been found by the new bank mismatch detection code.
* New in version 1.1
** New words
+ Import conditional compilation words "[IF]", "[ELSE]", "[THEN]",
"[IFDEF]" and "[IFUNDEF]" from gforth. Suggested by David McNab
+ "disallow-optimizations" and "allow-optimizations" allow a finer
control on PicForth optimizations.
** Bug fixes
+ Test with empty action part and a "else" is now handled properly.
Bug reported by Alex Holden <[email protected]>.
+ Make "include" and "needs" work properly.
** Miscellenaous
+ Add more comments to explain PicForth internals
+ Add a note in the documentation about static flash strings working
in target mode only.Problem reported by Alex Holden <[email protected]>.
* New in version 1.0.1
** Distribution glitches in 1.0
(reported by David McNab <[email protected]>)
+ Missing tools/bootloading directory
+ Missing dcc2.fs
** New files
+ Regression tests
** Changes
+ gforth's call is now hidden by picassembler's call
* New in version 1.0
** Port to GForth 0.6.2
+ PicForth now works with GForth 0.6.x line
* Changes since PicForth 0.32
** Enhancements
+ Include new loader from David McNab <[email protected]> in
tools/bootloading.
* Changes since PicForth 0.31
** Enhancements
+ Added jump tables, thanks to David McNab <[email protected]>.
+ The "::code" word was added, thanks to
David McNab <[email protected]>.
+ Added the SSPCON2 bit definitions, thanks to
J.C. Wren <[email protected]>.
+ The "pick" word was added, thanks to J.C. Wren <[email protected]>.
+ The "rot", "-rot" and "2swap" were added in libextra.fs,
thanks to J.C. Wren <[email protected]>.
** Bug fixes
+ 2dup fix by David McNab <[email protected]>. Also noticed by
J.C. Wren <[email protected]>.
+ PCLATH could be wrong in a loop located in upper banks. Bug found and
fixed by David McNab <[email protected]>.
+ Work around problem with GForth 0.5.0 kernel/require.fs file by including
a slightly modified version info PicForth. Bug reported by
David McNab <[email protected]>.
** Doc fixes
+ Document trisa/trisb/trisc. Omission noted by David McNab
** Tools
+ Add tools/fdasm from David McNab <[email protected]>.
+ Add tools/bootloading from David McNab <[email protected]>.
* Changes since PicForth 0.30
** Glitch fixes
+ Make the release ready for PIC16F88.
* Changes since PicForth 0.29
** Port for PIC16F88 architecture
+ PicForth can now generate code for PIC16F88 architecture, thanks to
Jamie Lawson <[email protected]>.
** License clarification
+ The various libraries have been explicitely marked as being in the
public domain. Thanks to William Kitchen <[email protected]> for
reporting this.
* Changes since PicForth 0.28
** Bug fix
+ Dumb code such as "7 9 < if ... then" (which would never occur in real
programs) is now properly handled. The optimizer was too enthusiastic
and did not set the carry flag properly.
* Changes since PicForth 0.27
** New words
+ The "sleep" word is imported from assembler and can be used from Forth
code.
** Bug fixes
+ Various bug fixes related to high addresses.
* Changes since PicForth 0.26
** New library
+ Library "libstrings.fs" allows the creation of 7 bits packed strings
in flash memory. Each program word holds two characters and strings
are zero terminated. An iterator allows the retrieval of one character
at a time.
** Incompatible change
+ Line-oriented literal strings now use CR/LF (two characters) instead of
CR alone. This makes more terminal software happy.
* Changes since PicForth 0.25
** New words
+ "w-!" removes the content of W from a memory register.
** New optimizations
+ "-!" can handle more cases.
* Changes since PicForth 0.24
** New words
+ "suspend-interrupts" and "restore-interrupts" allow interrupt bit saving
and restoring. Builtin words do use those internally. If "picisr.fs" is
not included, those words are noops.
* Changes since PicForth 0.23
** New words
+ "rrf!" and "rlf!" allow for variable bit shifting without resorting to
assembler.
+ "t," allows for a single byte to be added in a table.
** New optimizations
+ "lshift" and "rshift" have been further optimized.
+ "goto" is used in place of "call" in more places when it is possible.
* Changes since PicForth 0.22
** Feature change
+ "v-next" rememebers the variable used at "v-for" time. Therefore, "v-next"
no longer takes a variable address as parameter.
** New words
+ "table", "ftable", "eetable", "table>" and "end-table" allow to create
respectively RAM, flash or EEPROM tables.
+ The library "picflash.fs" contains new words "fcreate", "f,", "fallot"
and "fhigh!".
** New documentation
+ Some documentation has been started. Look for "picforth.pdf",
"picforth.txt", "picforth.info" and "picforth.html" and use the one
which most suits your needs and tastes.
* Changes since PicForth 0.21
** New features
+ It is now possible to use the whole PIC code space.
** Removed words
+ The words "table" and "tc:" have been removed as they were inefficient
and useless in their current form.
* Changes since PicForth 0.20
** New words
+ The words "bank0", "bank1", "bank2" and "bank3" allow to choose the
memory bank in which next variables will be stored.
+ "needs" works the usual way.
+ "set-stack-size" allows to set the default stack size.
* Changes since PicForth 0.19
** New optimizations
+ Obvious "cmove" cases are optimized.
** Doc emphasis
+ Make it clearer that there is an assembler included.
* Changes since PicForth 0.18
** Bug fix
+ Some rare conditions could lead to bad code being generated, because
of missing optimization barriers (the only legit sequence with
problems was "bit-clr? until").
* Changes since PicForth 0.17
** Data area initialization
+ Data area is now initialized if "," is used. Note however that variables
are not automatically initialized to 0 (see "README").
* Changes since PicForth 0.16
** New optimizations
+ Expressions followed by a test (such as a "if") will not be normalized
if it is not needed.
** New words
+ Two new words, "bit-clr?" and "low?" have been added.
** New libraries
+ The library "libcmove.fs" implements ANS Forth "CMOVE".
** New example
+ A new real-life example "spifcard.fs" has been added.
** Removed words
+ The word "/if", "c-if", "c-/if", "/until", "/while" and "=if" have been
removed as the new optimizations makes them unnecessary.
* Changes since PicForth 0.15
** New optimizations
+ More useless loads have been removed, generating even better code.
+ Words "hex>nibble" and "nibble>hex" from "libnibble.fs" have been
optimized.
+ "swap" and "drop" after a string literal word are optimized.
** New words
+ "=if" adds a new test.
** Preparation for larger programs
+ Jump to main program and interrupt handler properly handle PCLATH.
** New example
+ "i2cloader.fs" is a flash and eeprom programmer using I2C.
* Changes since PicForth 0.14
** New words
+ "bit" builds a name representing a particular bit at a particular address.
** Behaviour changes
+ Named bits (such as "c", "z", "t0if", ...) do now push their address
as well, and must be used without any address. For example, to test
for timer 0 overflow, you must use "t0if bit-set? if ... then".
** Parameters order changes
+ Words "bit-set", "bit-clr", "bit-set?", "bit-toggle", "high", "low",
"high?" and "toggle" now use inverted parameters (push port first then
bit number). Symbols defined with "bit", "pin-a", "pin-b", "pin-c",
"pin-d" or "pin-e" can now be used in assembly code as the parameter
order is similar to the Forth one.
** Renamed words
+ String + carriage return manipulation word has been renamed.
** Renamed example
+ "checker.fs" has been renamed "controller.fs", as the previous name
was misleading.
* Changes since PicForth 0.13
** New words
+ "/and" "invert" the top-of-stack then "and" the two top values.
+ "swapf-tos" exchanges nibble of top-of-stack.
+ Two words (see README) allow you to store strings in the EEPROM.
** New optimizations
+ "lshift" with a bit count greater than 3 will use a shorter code than
before.
+ "and" and "/and" will use bit manipulation when this is more efficient.
** New example
+ A new complete example "checker.fs" is included.
** New library
+ The "libnibble.fs" library converts characters to nibbles and nibbles
to characters.
** Bug fixes
+ In one case, the code generated by a "-" followed by "if" could be
incorrect.
+ In some cases, "lshift" and "rshift" could generate incorrect code.
* Changes since PicForth 0.12
** Bug fixes
+ The basic multitasker has been fixed to work correctly when the "yield"
operation crosses a 256 bytes page limit.
* Changes since PicForth 0.11
** New multitasker
+ A new multitasker (cooperative, priority-less, much simpler) has been
added. See README file for information on how to use both multitaskers.
** New optimizations
+ "incfsz" and "decfsz" will be used when it is possible.
* Changes since PicForth 0.10
** New features
+ Tasks of equal priority will all run if one of them runs (and code is
more efficient).
** New optimizations
+ Regular tasks need only 1 bit of data each instead of 1 byte (bits are
aggregated, 8 tasks will need only 1 byte of RAM).
+ Some redundant loads before tests have been suppressed.
* Changes since PicForth 0.9
** New features
+ PicForth now includes a priority-based cooperative multitasker, see
README file for details.
** New words
+ "lshift", "rshift", "2*" and "2/" are implemented.
* Changes since PicForth 0.8
** New words
+ "invert!" inverts the content of an address.
+ "-!" is implemented.
** New modes
+ "macro" allows you to enter the macro definition mode, while "target"
gets you back to code generation.
** New optimizations
+ "drop" followed by an integer leads to very efficient code.
+ "+" and "-" have been further optimized.
* Changes since PicForth 0.7
** New parameter passing convention
+ A new defining word "::" allow efficient W register parameter passing.
">w" and "w>" respectively pop the top-of-stack into w and push w on
the stack. They can be used to implement efficient return value handling.
** New optimizations
+ "or" now uses bit-set instructions when it makes sense, as well as "or!",
"and!" and "/and!".
+ "negate" and "invert" have been optimized.
** New words
+ "recurse" is implemented the traditional way.
+ ">input" and ">output" change a pin direction by working on the
corresponding tris register.
* Changes since PicForth 0.6
** New optimizations
+ A load followed by a constant + or - will be even further optimized.
** New check
+ The compiler now checks that you do not run out of code space and out of
RAM space (see README for more explanations).
** Bug fixes
+ The Makefile was not ideal and could induce some bugs due to the
redefinition of "include".
+ The previous definition of "over" was not interrupt-safe.
+ Some opcodes were not properly displayed by the disassembler.
* Changes since PicForth 0.5
** New disassembler and interactive mode
+ If you use "make interactive", you will be dropped into an interactive
mode where you can disassemble words using "see", "words", "map" and
"dis".
* Changes since PicForth 0.4
** New optimization
+ If an operation targets the top of stack and this one is then
popped into w, the operation is modified to target w directly.
** New example
+ A new example, "silver.fs", contains some code that runs on a
smartcard.
** New words
+ "eecreate" and "ee," manipulate EEPROM content
** New features
+ The EEPROM content can be programmed and is now dumped (see smartcard
example).
** Bug fixes
+ "ee@" selected the flash instead of the EEPROM
* Changes since PicForth 0.3
** New words
+ "high", "low", "high?" and "toggle" are aliases for "bit-set",
"bit-low", "bit-set?" and "bit-toggle" intended to work on ports
* Changes since PicForth 0.2
** New library files
Add library files "libfetch.fs" and "libstore.fs" which were forgotten in
previous versions and are used by "generator.fs".
* Changes since PicForth 0.1
** New words
+ "until" and "/until" (control structures)
+ "clrwdt" (accessible from Forth)
+ "pin-a", "pin-b", "pin-c", "pin-d", "pin-e" (pin mapping)
** Renamed words
+ "bit-clear" is renamed to "bit-clr"