Hello, as the FreeBSD user I decided to give avra a try.
It was necessary to add some patches to the assembler and
one dubious change to amforth, but it works very well,
and even .hex files are the same when produced by avra
and the Atmel tool.
I have posted patches to the newest avra (trunk,
Hello,
I have prepared some double-length words for your convenience:
Probably some could be more optimized.
--Marcin
; ( d -- ) Compiler
; R( -- )
; create a named constant
VE_2CONSTANT:
.dw $ff09
.db "2constant",0
.dw VE_HEAD
.set VE_HEAD = VE_2CONSTANT
XT_2CONSTANT:
Below please find definitions of c?, i? and ? - I find
them useful while exploring amforth (and AVR) interactively.
--Marcin
; ( addr -- ) Numeric IO
; R( -- )
; output single character from the address
VE_CQUESTION:
.dw $ff02
.db "c?"
.dw VE_HEAD
.set VE_HEAD = VE_CQUESTION
On Tue, 17 Aug 2010, pito wrote:
> Hi Marcin,
> let me ask you kindly following - there is an original 2x.frt
> library in amforth 4.0 with similar words - your lib is written in
> assembler - is this the same as the original (just rewritten to asm)
> or a new one?
Yes, those are written in assem
On Wed, 18 Aug 2010, Matthias Trute wrote:
> hi,
>
>> Yes, those are written in assembler - ready to be compiled into
>> the image during the assembly stage (so I don't need to upload them).
>
> Michael Kalus has written a smart tool that is able to convert any forth
> code to the special assembly
On Tue, 24 Aug 2010, Kalus Michael wrote:
> Hi Andy.
>
> Am 23.08.2010 um 13:40 schrieb a...@kirbyand.co.uk:
> ..
>> http://www.ruggedcircuits.com/html/mb324p.html
>
> Very interesting board. But there is no information on how they
> solved the USB-serial to ATmega324P connection. They call it Ard
On Sat, 28 Aug 2010, pito wrote:
> Matthias,
> something is telling me that the adress (the 16557)cannot be higher
> than
> 16384. P.
Do you have an assembly .lst listing or can produce one?
--Marcin
--
Sell apps to mil
On Sun, 29 Aug 2010, pito wrote:
> Marcin, when I do .s I see an address higher then 16383 (16557). So
> it is an indication for me something must be wrong there. Matthias
> sent the .s definition, from what I can see is he prints out the
> address (of RAM - I do assume - when talking data stack),
On Sun, 29 Aug 2010, pito wrote:
> I hope you are asking for this .lst (:-)). The whole .lst is 280k.
Can you gzip it and publish somewhere? Or mail me privately.
--Marcin
--
Sell apps to millions through the Intel(R) A
On Sun, 29 Aug 2010, pito wrote:
> Marcin, when I do .s I see an address higher then 16383 (16557). So
> it is an indication for me something must be wrong there. Matthias
> sent the .s definition, from what I can see is he prints out the
> address (of RAM - I do assume - when talking data stack),
On Sun, 29 Aug 2010, Volker Wolfram wrote:
> Hello,
>
> I've copied the template directory and get weird errors form the words
> source files.
>
> I'm using amforth 3.9.
>
> Can anyone give me a comment to work with amforth and how to compile it
> for ATmega32a?
Do you have avra source? Can you t
On Sun, 29 Aug 2010, Matthias Trute wrote:
> There is a simple answer: avra cannot be used. Use the Avr Assembler 2
> from the AVR Studio with wine. Avra did work in the past, but not with
> the current code. I cannot tell, which amforth version was the last
> one that avra understood, its long ag
On Sun, 29 Aug 2010, Volker Wolfram wrote:
> ../../core/words/istore_nrww.asm(55) : Error : Found no
> label/variable/constant named
> RWWSRE
> ../../core/words/istore_nrww.asm(55) : Warning : Constant out of range (-128
> <= k <= 255
> ). Will be masked
> AVRA: advanced AVR macro assembler Ve
On Sun, 29 Aug 2010, Volker Wolfram wrote:
Hi Marcin,
here is my Include- file m32def.inc.
nevermind.
Can you try the attached m32def.inc instead?
It can be placed in the project directory (where you have m32.asm)
--Marcin;* THIS IS A MACHINE GENERATED FILE - DO NOT EDIT ***
On Sun, 29 Aug 2010, Volker Wolfram wrote:
And it's time for a new 'Rhöner Landpremium'.
I will try to update avra with those changes.
And we are stuck here with Ebbelwoi! Prost!
--Marcin--
Sell apps to millions thro
On Tue, 7 Sep 2010, pito wrote:
> Hi Matthias,
> not sure, but I think the
>> 123 345 567
> ok
>> .s
> 0 16377 567
> 1 16379 345
> 2 16381 123
> ok
>> sp0 .
> 16383 ok
>
> shall be in following form (when assuming lower byte first). Am I
> right?
>> .s
> 0 16378 567
> 1 16380 345
> 2 16382 123
N
Hello,
This is just to announce that this very mailing list is available
also via NNTP (newsreader) or HTTP (web browser) at gmane.org.
Just point your newsreader to:
nntp://news.gmane.org/gmane.comp.lang.forth.amforth
or go to:
http://dir.gmane.org/gmane.comp.lang.forth.amforth
and pick one
On Wed, 8 Sep 2010, pito wrote:
> Marcin, thanks! So when I dump:
>
> then I see at sp0 = 16383 is 0. Why the 111 is written to 16381
> (low) and 16382 (high) and not to 16382 (low) and 16383 (high)? Not
> so important, only the alignment of words on odd addresses is
> something unusual to see..P.
On Wed, 8 Sep 2010, Kalus Michael wrote:
> Hi.
>
> Is there a readme.txt or so giving hints how to establish the
> communicate via the USB of arduino board, after the
> duemilanove.eep.hex and duemilanove.hex are flashed successfully?
>
> Friends keep complaining not getting the ok using it from t
On Wed, 8 Sep 2010, pito wrote:
> Hi, I started with LP asm (amforth 4.0):
> \ - Test AvrAsm -
> : loadtos, 16 Y+ ld, 17 Y+ ld, ; \ define macro
> : savetos, -Y 17 st, -Y 16 st, ; \ tosl=r22, tosh=r23
>
> code dup_ savetos, end-code \ insert asm code
> code drop_ loadtos, end-code
On m
On Wed, 8 Sep 2010, pito wrote:
> Marcin, I am ansewering to you in this thread: No, R16 and R17 are
> ok for my cpu, but not correct from OS prospecive. I've spent a
> sleepless night with playing with registers against definitions in
> macros.asm (it seems Registers 10,11,12,13, are not used by
Small tidbits from 4.1:
avra complains with 2r>:
[exec] ../../core/words/2r_from.asm(6) : Warning : A .DB segment with an
odd number of bytes is detected. A zero byte is added.
Fix:
Index: 2r_from.asm
===
--- 2r_from.asm (we
On Wed, 8 Sep 2010, pito wrote:
> A version with unused registers, crashes (anforth 4.0,
> assembler.frt).
>
> \ Manual v 4.0 : The registers from R10 to R13 are currently unused,
>
> \ but may be used for the VM extended registers X and Y sometimes.
>
> code ++_ \ ( x1 x2 x3 -- x4 )
Looking at m
Two quick remarks:
>> 2. how the data from data stack (or from return stack) are passed to
>> assembler
- data stack (all elements EXCEPT top of the stack) are kept close
to the end of RAM (end of RAM - 128), growing down.
- TOP of the stack is kept in register pair (tosh:tosl)
>> 3. how the
On Fri, 10 Sep 2010, pito wrote:
First, I am assuming that "Luboš assembler" is a set of words
from the lib/assembler.frt file in the amforth distribution.
Is this correct?
1. I want to write a new word full in asm called fuX (a b c -- y )
2 I want to use an existing "code" written in assembler
On Sat, 11 Sep 2010, pito wrote:
> push R0 ; worst case - store everything
> push R1
> push R2
> .
> push R31
Please be careful NOT to restore r28, r29
(register Y - your data stack pointer)
and r24, r25 - top of your stack.
>
> ld R10, Y+
> ld R11, Y+ ; takes c from
On Wed, 15 Sep 2010, pito wrote:
> Hi,
> is there any expalnation available on what these
> .dw $ff03;
High byte:
$75 means the word is immediate word
$ff means the word is about to compiled normally
Low byte:
$03 is a length of the word name in bytes that follows
See core/words/do
I have uploaded the fdiv code (the one I got from Pito) integrated
into amforth here:
hg clone http://saper.info/hg/forth/fdiv/
It defines "f0", "fmin", "fmax" and "f/" words.
//Marcin
--
Start uncovering the many adv
On Wed, 15 Sep 2010, Erich Waelde wrote:
>
> avra is currently being worked on again, so it might work again in the near
> future.
>
It works if you apply my three patches (and remove unsupported .overlap /
.nooverlap
for now).
Links for patches:
3044547 Error:: ldi can only use a hi
Al Williams wrote:
> I saw amforth and popped it on an ATMega 8. Works but very little code space.
> So I dug up an ATmega 16 (you can mark it as working on the matrix -- it
> does).
>
> However, I want to be able to use Marker. I have uploaded the definiton
> several
> different ways includi
On Wed, 15 Sep 2010, Al Williams wrote:
> One of my many hats is that I am a "blogger" for the venerable Dr. Dobb's
> Journal (I used to do columns for their magazines, but blogging is hipper ;)
> ).
>
> I wrote about my experiences with Amforth:
> http://www.drdobbs.com/blog/archives/2010/09/fort
Al Williams wrote:
> Right, I understand the i@ word constitutes a bootloader of sorts. But I was
> trying to get a way a student with no strange equipment could go back to a
> default state. I guess another way would be to drop a marker at the end of
> the
> default dictionary and have a conf
Dnia 16.09.2010 Matthias Trute napisał/a:
>
> btw: I'm still working on the marker issue. strange case
Matthias,
Reverting change 918 to istore_nrww.asm fixes the marker issue.
--Marcin
--
Start uncovering the man
Al Williams wrote:
> Not sure why, but I tried running the 8MHz internal RC again and now its
> fine.
> Granted, before I was on the 4.1 and now I'm on 3.8 -- doubt that's the
> difference though. Probably operator error!
There seems to be a bug in i@ introduced in 4.1 (see other postings). Ca
>> Al Williams wrote:
> Hand compile of marker from the ANS library. Note that this requires the head
> version of 4.1 as discussed earlier.
>
> http://dl.dropbox.com/u/360343/marker.asm
I think we should have a motto:
"Amforth - your computer is fun again"
:)
By the way, did you have a chanc
>> Erich Waelde wrote:
> Hi Al,
>
> On 09/17/2010 08:11 PM, Al Williams wrote:
>> http://dl.dropbox.com/u/360343/am4up.c
>
> superb! Works for my arduino duemilanove, which is very
> resistive to amforth-upload.py.
While we are at it, anyone has an idea why xonxoff.frt causes
serial communication
>> Erich Waelde wrote:
>
> The bit $10, which is apparently not set, ist the MSTR bit. That fits
> the symtoms I'm seeing: "spirw" (available in core/words/spirw.asm)
> never returns, because SPIF in register SPSR is never set. No wonder,
> if we are not in master mode to begin with. The bit-bang
>> Karl Lunt wrote:
> I have tried without success to contact Matthias regarding a new
> amforth user's manual that I have completed. This document is a
> complete rewrite, up to date with amforth v4.2, and includes a full
> working amforth design. I would like to pass this along to Matthi
>> Erich Waelde wrote:
> Hi Matthias,
>
>>
>> http://amforth.sourceforge.net/refcard.pdf
>>
> Very cool! This is IMHO a good handout to folks
> attending a class :-)
Yes, very useful. I could have used that for the class,
too.
Few improvements to suggest: I see stack effects underlined,
I think
>> Erich Waelde wrote:
> You are forced to extract the include files from AVR Studio, because license
> obligations do not permit anyone else to distribute those files, or
> AVR Studio itself.
Do you have some more information about licensing? Actually the
platform specific-includes are machine-
> Now I just have 30 years since I last used Forth to overcome. :)
Welcome onboard :) I never have had used it in my 8 bit times
(I rejected FORTH64 as bizarre) and now I regret it.
//Marcin
--
Special Offer-- Download
>> Elliott Chapin wrote:
> I am now looking at using avra under linux. Avra doesn't compile for me,
> so I am trying the static version. As recommended, I have downloaded
> amforth by svn, ... Accordingly, it appears that the makefile lines
Can you post your compilation problems?
> DIR_ATMEL=.
>> Matthias Trute wrote:
> Hi,
>
> Elliott Chapin wrote:
>
>> Makefile.am: required file `./NEWS' not found
>> Makefile.am: required file `./ChangeLog' not found
>>
>> As a late friend might have said: It bagles the mind. Why might such
>> files be needed?
>
> an easy and quick fix is simply creat
>> Erich Waelde wrote:
> it's makefiles/... with 's'.
thanks, of course you are right, sorry for my mistake
> On amd64 I currently need the trailing LDFLAGS='' to remove the "-s"
> compiler option. Otherwise I get a relocation error. Using strip
> separately afterwards is save.
I tried that on
> I duplicated these steps on my desktop machine (running windows 2000)
> and targeted for the simulator. Everything works the same; execution of
> that ijmp instruction again has 0x3860 in Z, and also crashes studio4.
>
> Surely something that simple, in a tool chain that's been released as
> l
>> D Nyberg wrote:
> Issue 2: With the console running, I can do a few really basic things
> such as 1 . yields a correct response of 1 ok, but... If I enter 1
> 2 + . I get the strange response "?? -13 6" ok.
Does the "words" command work? If not, there may be different issues.
First, did
>> D Nyberg wrote:
> entered "1 1 + ." I think the error was because I am using tera term,
> which sends a whole line at once. Combine that with the imperfect clock
> setting, and I think the atmel uart saw unprintable characters by byte 6
> or 7 in a string because of timing problems. Or possi
>> Kalus Michael wrote:
> I use ZTerm with Mac OSX. In typing mode, it stops sending when XOFF
> character is echoed, and continues after XON. So my amforth CR sends
> xoff to the Terminal too, and the OK is followed by XON.
> (Typing mode: copy&paste forth souce into ZTerm window, do not use
Hello,
I have committed some changes to AVRA so that .overlap/.nooverlap
directives are actually understood. This brings us closer
to compile amforth with avra without any problems.
Now you need to:
- get the latest avra via:
git clone git://avra.git.sourceforge.net/gitroot/avra/avra
- c
Hello,
I tried to compile amforth trunk with avra and I get:
[exec] /usr/home/saper/sw/amforth/trunk/core/dict_usart.inc(7) : Error :
Found no label/variable/constant named XT_USART_INIT_RX_ISR
[exec] /usr/home/saper/sw/amforth/trunk/core/dict_usart.inc(7) : Error :
XT_USART_INIT_
When compiling r1076 with avra:
[exec] /usr/home/saper/sw/amforth/trunk/core/words/usart-rx-isr.asm(12) : Error
: Found no label/variable/constant named XT_RXQ
My duemilanove.asm (pretty much unchanged since 4.0):
.include "macros.asm"
.include "device.asm"
.set WANT_AD_CONVERTER = 1
.set WAN
>> Erich Waelde wrote:
> Hi Marcin,
>
> On 06/10/2011 10:59 AM, Marcin Cieslak wrote:
>> When compiling r1076 with avra:
>>
>> [exec] /usr/home/saper/sw/amforth/trunk/core/words/usart-rx-isr.asm(12) :\
> >Error : Found no label/variable/constan
>> Matthias Trute wrote:
> Hi Marcin,
>
>> When compiling r1076 with avra:
>>
>> [exec] /usr/home/saper/sw/amforth/trunk/core/words/usart-rx-isr.asm(12) :
>> Error : Found no label/variable/constant named XT_RXQ
> .
>>
>> Didn't have time to look deeper into this, but maybe some include o
>> Keith Causey wrote:
> Hello All,
> I have tried several times to pose my question so I think that I may be
> doing something wrong. I am having problems both compiling for the ATMega
> 2560 and finding a device to up load the code (once it gets compiled) to
> said device.
I hope you are goin
>> Torsten Sadowski wrote:
> Thanks for all the help.
>
> It seems that avra does not work correctly with the macro definitions. Below
> is the beginning of a diff of the disassemblies. Flash.dis is from avra and
> flash2.dis from avrasm2. The cold boot jump is obviously wrong.
Torsten, can y
>> Torsten Sadowski wrote:
> Hello Marcin,
>
> This is what I get from avra:
>
> duemilanove.hex:
> [exec] AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May
> 2010)
> [exec] Copyright (C) 1998-2010. Check out README file for more info
> [exec]
> [exec]AVRA i
>> Robert Epprecht wrote:
> Does amforth set up a timer to measure time or do I have to do that by
> hand? I need a word similar to arduino micros() to keep track of time.
> Has somebody already written that?
1ms ( is wait one microsecond )
n ms ( wait n microseconds) )
> btw: What hw initiali
Hello,
my build of amforth trunk (r957) fails with amforth-eeprom.asm
that VE_ROOT is not defined anywhere.
It seems that even ONLY restores the wordlist order to contain
FORTH vocabulary and there are no words defined in VE_ROOT.
A patch below removes the VE_ROOT altogether, but I am not sure
>> Robert Epprecht wrote:
> another amforth newbie question
>
> .res (lib/misc.frt) from the forth prompt gives:
> used return stack cells 11
>
> 11 cells, why so many?
My older amforth 4.3 repors only four cells.
You may try to list them all and lookup
the words using the assembly list fi
>> Hannu Vuolasaho wrote:
>
> Sorry. Maybe I wasn't quite clear. Im building Amforth 4.9
>
>
> $ avra --version
> AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
>
> I think I'm getting on with this. problems with .overlap org errors required
> git version of Avra.
>
> http:
On Fri, 17 Aug 2012, Erich Waelde wrote:
> Hello Marcin,
>
> I have made tests
> 1. compile avra from git
> commit a6e8b2957953810dae6467eeb4905bfc5ea6c33e
> Author: Marcin Cieslak
> Date: Wed Aug 8 17:01:30 2012 +0200
> Does this help?
Yes, thank you.
It seems
On Sat, 18 Aug 2012, Erich Waelde wrote:
> > 1) revert to amforth 4.4 hardcoded "rjmp" since we can
> > assume the distance is pretty small here.
>
> I have included doplusloop.asm from amforth-4.4 into the build
> from amforth-4.5, and verified the difference in source. Result:
> amforth bu
>> Matthias Trute wrote:
> Hi,
>
>> avrasm2 generally does not allow using not-yet-defind
>> labels in macros like this.
>
> really? I doubt it.
To be correct: ifdef returns false for
forward references and therefore jmp is assembled
by AVRASM2.
>> 2) add a nop after "rjmp" in the "jmp_" macro
On Thu, 15 Aug 2013, Erich Waelde wrote:
> All this just confirms that this particular version of avra is lacking
> support for "forward references".
Yeah, we need to get it right and quickly release a new version...
//Marcin
-
64 matches
Mail list logo