Re: [Amforth] AVR8 watchdog (reset and interrupt) atmega328p
Müsste es dann nicht c!wd heißen? Michael 2017-05-07 15:42 GMT+02:00 Matthias Trute: > Hi Tristan, > > I've put your code online, revision 2252 contains the new > file. There is only one change: I renamed the wd! into !wdc. > It tells "store to watchdog control" and follows the more > or less informal convention that ! and @ can be preceeded > with size information and followed by location information. > Just like c!e or @i. Hope that's ok for you. > > http://amforth.sourceforge.net/TG/recipes/Watchdog.html > > Thank you > Matthias > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] New release 6.2
Is there a link to a list of those strange behaving? May be of use beyond amforth. Michael Am 04.07.2016 20:26 schrieb "Matthias Trute": > Hi, > > It's been a long time since the last release but some strange > effects needed to be handled with the FRAM equipped MSP430 devices. > They behave much like a diva and are worse than the fuses of the > atmega's ;) > > Most of the changes are for the MSP430 devices, I started to learn > the assembler programming for them. Some changes are for both > platforms, details as usual on the homepage http://amforth.sourceforge. > net/ The update from version 6.1 is recommended. > > Have fun > Matthias > > -- > Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > ___ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel > -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] My FM Radio Article
And it was covered in Forth Magazin "Vierte Dimension" 4d2014-01.pdf www.forth-ev.de --> Menu: Download --> PDF-Archiv Michael 2015-12-21 15:24 GMT+01:00 craig and heather: > In case anyone is interested I also coded up the FM radio project in > AmForth. It is available on my website here: > > craigandheather.net/misc/fm_receiver.zip > > -- > Craig Lindley > > New Recordings: craigandheather.net/cnmpage.html > Latest rock CD: craigandheather.net/hellinahandbasket.html > Latest non-rock CD: craigandheather.net/craigdoesfingerstyle.html > > Personal Website: craigandheather.net > > Phone: (719) 495-1873 > Cell: (719) 502-7925 > > If you’re one in a million, there are now seven thousand people exactly > like you. > -- > ___ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel -- ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] OT: Cycle accurate balanced assemly?
Perhaps we should email? mik.ka...@gmail.com Am 04.11.2015 10:42 schrieb "Hannu Vuolasaho": > > > Michael wrote: > > > > ; Were'synced > > ; calculate output part 1 > > ; wait 2300 cycles > > ; Read inputs > > ; Choose output port > > ; calculate output part 2 > > ; 170 cycles after read write output > > > > This same routine runs parallel in 3 different MCUs? > > So they have to be hardware synced. > > > > Make MCU0 the master, slaves are MCU1 and MCU2 then. > > > > MCU0 needs 2 sync-signal input port pins. > > > > MCU1+2 need 1 sync-signal output port pin. > > > > MCU1 and MCU2 need a ready input pin. > > > > When R is done, MCU1+2 set their sync signal port bit. > > > > Connect MCU2-sync-out --> MCU0-sync2-in > > Connect MCU1-sync-out --> MCU0-sync1-in > > Connect MCU0-ready-out --> MCU1+2-ready-in > > > > When Master MCU0 is ready, it pulls those incomming sync-bits until all > > are set. Now master sets his ready port pin for MCU2 and MCU3. Now you > > are synced again. Proceed... > > > > Is that what was on your mind? > > That was my first idea. There are two problems, mechanical space and > isolation. > The clock signal is optocoupler isolated and using more pins doesn't fit > and > decoupling more signals would also use too much space. > > However I'm trying to tackle this problem with simavr. > > If that doesn't help I'll wirite something which calculates time for me > from source files. > > Hannu Vuolasaho > > > -- > ___ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel > -- ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Is this a bug ?
2015-01-31 20:27 GMT+01:00 Andrew Holt andrewthol...@gmail.com: : test , Hello cr ; does amforth realy have a , word? (komma-quote) Try . instead (dot-quote) mk -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] R: Re: R: Re: R: Re: R: Re: HW flow control
Good luck for your project. Michael Am 10.08.2014 um 16:22 schrieb Paolo Garro: Hi Michael, The Matthias implementation handles flow control once for each line. That's ok for me. Perhaps XON XOFF are not the right names... The goal is to manage a ready/busy flag. The canonical SW flow control might work different but also the echo control is not a standard. Using both of these we can write a good serial (custom) interface. Com device must be used with NO flow control being our a SW level infomation rather than a communication state. Paolo Inviato da Samsung Mobile Original message Subject: Re: [Amforth] R: Re: R: Re: R: Re: HW flow control From: Michael Kalus mik.ka...@gmail.com To: Everything around amforth amforth-devel@lists.sourceforge.net CC: Never forget: xon/xoff is for *single* character exchange - send one, get echo, check it, send another one... Sender must interpret *each* echo character immediately and stop at xoff at once. Use xon/xoff to connect two amforth devices via TXD/RXD. Or on a PC use a sending tool able to do that. amforth shell is such a tool. If you send ascii to amforth using a terminal emulator on your PC via a USB-serial converter, forget xon/xoff. There will be huge blocks of characters already send to the pipeline of USB, overrunning your forth target, before any terminal emulator will notice the xoff. Or do you have a USB-serial converter that handles xon/xoff ? Michael Am 10.08.2014 um 14:34 schrieb Paolo Garro: Hi Matthias, Does REFILL load a single line? In a multiline colon definition is it called for each line? If so I think the best place to handle XON/XOFF is QUIT itself. At the begin of the loop after calling REFILL assert XOFF and before closing the loop assert XON. That way transmission is blocked while the interpreter is working including the case of an error answer (xxx ?? -nn nn) and, on the other side, I will receive an XON at the end of each answer. Paolo Inviato da Samsung Mobilenull - - ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Adding WANT_X and a forth constant in asm (was: HW flow control)
xon/xoff are characters send. With USB this is does not work better than CR or any other character. Target and PC do not communicate character by character any more. Terminal emulaters do not stop in time, there are buffers inbetween, overrunning oldfashion xon/off protokolls. Michael Am 02.08.2014 um 15:07 schrieb Erich Waelde: Hi Paolo, Thank you for your response. On 08/02/2014 01:39 PM, Paolo Garro wrote: Hi Erich There is nothing wrong. Me too I'm reading the echo char while transmitting. The timeout problem is while receiving form the mcu. After transmitting a line you stay earing for a response. How can I know when the response is complete? When you received the prompt \n . Wait a lot of seconds is not so logic. How can I know if the mcu is ready to receive another line? When you received the \n prompt, too, I think. An XON ending char would be fine... I have the timeout question in my stuff as well, but it is not easy. There are several (more than 1) controllers on the same rs485 bus. I do not want them to just send anything unless I asked them. So I removed any output from startup including the prompt. When I address one controller I send its address (with the highest bit set) and it shall wake up and present it's prompt. I also added the controller address to the prompt itself, a station with address $4f will answer as \n~4F and the programm controlling everything needs to wait for this string to be received. This particular setup cannot work with xon/xoff. The bus has only one pair of cables. Therefore I want to see each and every character echoed, so I know the remote station is still avalailable (connected and alive). But that is just my setup and I'm not saying, you are wrong. I just doubt that it will help you as much as you think. So lets assume for the moment, you want XOFF/XON hw flow control. Fine. So you select two output pins of the controller to drive the signals. Still fine. Next question: where in amForth do you assert the xon and xoff signals? I might be wrong, but the prompt function looks like the correct place to me to assert XON. You are at the same place, where the prompt is sent. So does XON help you? Again, I might be wrong alltogether. And if you really want xon/xoff, it can definitely be added to your system. And if it works, great! You can add .set WANT_XON_XOFF = 1 in your template.asm or equivalent file and use it in any other assembly file like so .if WANT_XON_XOFF == 1 .set XON_XOFF_PORT = PORTD; io location, not mem mapped .set XON_XOFF_PIN = 7 .endif or similar. If you want to have a FORTH constant at the same time to know for example the pin number, then you create the equivalent asm code in a file (words/xon_xoff.asm for example): ; asm(XON_XOFF_PIN) constant xon_xoff_pin VE_XON_XOFF_PIN: .dw $FF0C .db xon_xoff_pin .dw VE_HEAD .set VE_HEAD = VE_XON_XOFF_PIN XT_XON_XOFF_PIN: .dw PFA_DOVARIABLE PFA_XON_XOFF_PIN: .dw XON_XOFF_PIN this creates the xon_xoff_pin as a forth constant. Please note that this code is adapted from my experiments with amForth-4.6, so it might need to change for a current version. The file needs to be included into your build via dict_appl.inc .if WANT_XON_XOFF == 1 .include words/xon_xoff.asm .endif Rebuild amForth, test, repeat. Look into core/words/ for inspiration. Hope this helps and good luck! Cheers, Erich -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] R: Adding WANT_X and a forth constant in asm (was: HW flow control)
Hi. In 4e4th the PROMPT is a forth word, executed right after INTERPRET . That way it is easy to modify. I use character ACK ( $06 EMIT ) as signal for the 4e4th-IDE shell. You may serve other information with the prompt string, like the current number base, or what ever you need. mk ; C PROMPT --prompt user HEADLESS PROMPT,DOCOLON IF PREFIXPROMPT!=1 DW STATE,FETCH,ZEROEQUAL,qbran DEST PROMPT1 DW lit,06H,EMIT ; send ACK DW BASE,FETCH,DUP,HEX,lit,'$',EMIT,lit, 02,ZEROUDOTR,BASE,STORE DW XISQUOTE DB 3,'ok '; for traditional Forth style DW ITYPE ENDIF PROMPT1:DW EXIT Am 02.08.2014 um 16:46 schrieb Paolo Garro: Hi Erich, You are pretty right... Wait the ok and then the \n prompt is not a valid solution. In the middle of a : definition, the response is a sole ok without a prompt so it is ambiguous in general. I've also tried to wait for an error message r\?\? -\d+ \d+ \n $ to stop the loop while any other response was intended ok. But I still have the timeout calibrating problem. An unambiguous EOT char will state that mcu is ready. Paolo Inviato da Samsung Mobile Original message Subject: [Amforth] Adding WANT_X and a forth constant in asm (was: HW flow control) From: Erich Waelde ew.fo...@nassur.net To: amforth-devel@lists.sourceforge.net CC: Hi Paolo, Thank you for your response. On 08/02/2014 01:39 PM, Paolo Garro wrote: Hi Erich There is nothing wrong. Me too I'm reading the echo char while transmitting. The timeout problem is while receiving form the mcu. After transmitting a line you stay earing for a response. How can I know when the response is complete? When you received the prompt \n . Wait a lot of seconds is not so logic. How can I know if the mcu is ready to receive another line? When you received the \n prompt, too, I think. An XON ending char would be fine... I have the timeout question in my stuff as well, but it is not easy. There are several (more than 1) controllers on the same rs485 bus. I do not want them to just send anything unless I asked them. So I removed any output from startup including the prompt. When I address one controller I send its address (with the highest bit set) and it shall wake up and present it's prompt. I also added the controller address to the prompt itself, a station with address $4f will answer as \n~4F and the programm controlling everything needs to wait for this string to be received. This particular setup cannot work with xon/xoff. The bus has only one pair of cables. Therefore I want to see each and every character echoed, so I know the remote station is still avalailable (connected and alive). But that is just my setup and I'm not saying, you are wrong. I just doubt that it will help you as much as you think. So lets assume for the moment, you want XOFF/XON hw flow control. Fine. So you select two output pins of the controller to drive the signals. Still fine. Next question: where in amForth do you assert the xon and xoff signals? I might be wrong, but the prompt function looks like the correct place to me to assert XON. You are at the same place, where the prompt is sent. So does XON help you? Again, I might be wrong alltogether. And if you really want xon/xoff, it can definitely be added to your system. And if it works, great! You can add .set WANT_XON_XOFF = 1 in your template.asm or equivalent file and use it in any other assembly file like so .if WANT_XON_XOFF == 1 .set XON_XOFF_PORT = PORTD; io location, not mem mapped .set XON_XOFF_PIN = 7 .endif or similar. If you want to have a FORTH constant at the same time to know for example the pin number, then you create the equivalent asm code in a file (words/xon_xoff.asm for example): ; asm(XON_XOFF_PIN) constant xon_xoff_pin VE_XON_XOFF_PIN: .dw $FF0C .db xon_xoff_pin .dw VE_HEAD .set VE_HEAD = VE_XON_XOFF_PIN XT_XON_XOFF_PIN: .dw PFA_DOVARIABLE PFA_XON_XOFF_PIN: .dw XON_XOFF_PIN this creates the xon_xoff_pin as a forth constant. Please note that this code is adapted from my experiments with amForth-4.6, so it might need to change for a current version. The file needs to be included into your build via dict_appl.inc .if WANT_XON_XOFF == 1 .include words/xon_xoff.asm .endif Rebuild amForth, test, repeat. Look into core/words/ for inspiration. Hope this helps and good luck! Cheers, Erich -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds
Re: [Amforth] ATmega16 and ATmega128
Hi. Never split a winning team :-) Michael Am 18.05.2014 um 20:38 schrieb Matthias Trute: Hi Enoch, I understand the reason for the change in trunk@1584 macros.asm, that is, to put things behind the curtains. However, you have created another forward reference warning, an unnecessary annoyance to a diligent programmer: Diligent and annoyed programmer, you are? H macros.asm refers to RAMEND which is introduced only later through device.asm. Indeed. I uploaded an unfinished work. I beg your pardon. Matthias -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Waking up a dormant forum :-)
Hi. ..but not sacrifying compactness Here is what you can do with NO vm kernel word at all: http://mecrisp.sourceforge.net/ ..standalone native code Forth for MSP430 microcontroller chips... ..It fits tightly into 9kb of Flash and runs with 512 Bytes of Ram... By the way, its free. Use whatever routine you like, a great pit. A good job Matthias did there - no not Trute, is Koch this time. :-) Good luck! Michael Am 07.06.2013 um 10:11 schrieb Rafael Gonzalez: One of the criteria that you should use is that the pure assembly implementation should not exceed in size to the VM assembly implementation +10% (let's give a margin, ok?) Speed, yes but not sacrifying compactness Rafael De: Enoch i...@hotmail.com Para: amforth-devel@lists.sourceforge.net Enviado: Jueves 6 de junio de 2013 21:37 Asunto: [Amforth] Waking up a dormant forum :-) Hello AmForth-ers, Can somebody give me good reasons why we should not convert words/ *.asm implementations (as much as possible) from VM assembly to AVR assembly. For example: ; ( a-addr1 -- a-addr2 ) ; Arithmetics ; add the size of an address-unit to a-addr1 VE_CELLPLUS: .dw $ff05 .db cell+,0 .dw VE_HEAD .set VE_HEAD = VE_CELLPLUS Current implementation: === XT_CELLPLUS: .dw DO_COLON PFA_CELLPLUS: .if CELLSIZE == 2 ; .dw XT_1PLUS .dw XT_1PLUS .else .dw XT_DOLITERAL .dw CELLSIZE .dw XT_PLUS .endif .dw XT_EXIT Suggested implementation: = XT_CELLPLUS: .dw pc + 1 adiw tosl, CELLSIZE jmp_ DO_NEXT There are two good reasons to prefer the AVR implementation: 1. Speed (10x faster?) 2. Ease of debugging through the Studio. Comments? [flames :-)] Thanks, Enoch. -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Waking up a dormant forum :-)
Hi. Am 08.06.2013 um 02:37 schrieb Enoch: Michael Kalus mi-ka...@t-online.de writes: Hi. ..but not sacrifying compactness Here is what you can do with NO vm kernel word at all: http://mecrisp.sourceforge.net/ ..standalone native code Forth for MSP430 microcontroller chips... ..It fits tightly into 9kb of Flash and runs with 512 Bytes of Ram... By the way, its free. Use whatever routine you like, a great pit. A good job Matthias did there - no not Trute, is Koch this time. :-) Good luck! Michael Hello Michael, Not again what's the best 8 bit micro :-) I chose the AVR a couple of years ago for its better open source C support. Now we are here at AmForth to make its Forth variant the best around too! Mecrisp is just an example that it can be done, and it could be done on AVR as well I guess. And our Matthias is doing great job and he has demonstratd being open to criticism too! Thats true, without doubt. We still have to convince him though what's the correct stack order .s ;-) Which is without doubt too. ;-) Michael Cheers, Enoch. Am 07.06.2013 um 10:11 schrieb Rafael Gonzalez: One of the criteria that you should use is that the pure assembly implementation should not exceed in size to the VM assembly implementation +10% (let's give a margin, ok?) Speed, yes but not sacrifying compactness Rafael De: Enoch i...@hotmail.com Para: amforth-devel@lists.sourceforge.net Enviado: Jueves 6 de junio de 2013 21:37 Asunto: [Amforth] Waking up a dormant forum :-) Hello AmForth-ers, Can somebody give me good reasons why we should not convert words/ *.asm implementations (as much as possible) from VM assembly to AVR assembly. For example: ; ( a-addr1 -- a-addr2 ) ; Arithmetics ; add the size of an address-unit to a-addr1 VE_CELLPLUS: .dw $ff05 .db cell+,0 .dw VE_HEAD .set VE_HEAD = VE_CELLPLUS Current implementation: === XT_CELLPLUS: .dw DO_COLON PFA_CELLPLUS: .if CELLSIZE == 2 ; .dw XT_1PLUS .dw XT_1PLUS .else .dw XT_DOLITERAL .dw CELLSIZE .dw XT_PLUS .endif .dw XT_EXIT Suggested implementation: = XT_CELLPLUS: .dw pc + 1 adiw tosl, CELLSIZE jmp_ DO_NEXT There are two good reasons to prefer the AVR implementation: 1. Speed (10x faster?) 2. Ease of debugging through the Studio. Comments? [flames :-)] Thanks, Enoch. -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel - - How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Amforth-devel mailing
Re: [Amforth] CVARIABLE
Hi. What about mnemonic conventions like .s .r .line . xxx or key? ?DO and such? Don't we already use such unwritten laws? Michael Am 21.03.2013 um 21:24 schrieb Enoch: Matthias Trute mtr...@web.de writes: Hi Wis, It may be a good practice to prefix any cvariable name with a mnemonic string (e.g., c_) to help avoid the troublesome behavior IIRC it is called Hungarian Notation. I'll add a link to the wikipedia article to the recipe. But Leo Brodie is defintely not Hungarian :-) He writes about Choosing Names: The Art Choose names according to “what,” not “how” But good names are essential for readability. Moreover, the mental exercise of summoning a one-word description bears a synergistic effect on your perceptions of what the entity should or should not do. Let's leave the Hungarian method to Microsoft, where it was invented. It is an essential evil when managing large projects though. Regards, Enoch. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Variations on .S
Hi. Lets take a look at some common Forths, Revision appended. They do it in the typed order left to right. Only VFX does it top down linewise, like amforth in its older days. Though not a standard, typed order is Normative Kraft des Faktischen. (google: normative power of the factual) Brodies I like best. Unfortunately he does not tell us how the negative numbers are treated. Regards, Michael :-) - Revision of Examples gforth: 11 -22 33 .s 3 11 -22 33 ok win32forth: 11 -22 33 .s [3] 11 -22 33 ok... (with a dot for each item, none if empty stack) VFX Forth for Windows IA32: 11 -22 33 .s DATA STACK top 33 :0021 -22 :FFEA 11 :000B ok-3 SwiftX MSP430 EVALUATION 3.5.9 12-Apr-2011: 11 -22 33 .s 11 -22 33 -Top ok And last but not least, the Masters Voice: Starting Forth by Leo Brodie - Chapter 2 http://www.forth.com/starting-forth/sf2/sf2.html snip A Handy Hint A Non-destructive Stack Print Beginners who are just learning to manipulate numbers on the stack in useful ways very often find themselves typing a series of dots to see what's on the stack after their manipulations. The problem with dots, though, is that they don't leave the numbers on the stack for future manipulation. The Forth word .S prints out all the values that happen to be on the stack non-destructively; that is, without removing them. Let's test it, first with nothing on the stack: .S 0 ok As you can see, in this version of .S, we see at least one number. This is the number of items actually on the stack. Now let's try with numbers on the stack: 1 2 3 .S 3 1 2 3 ok ROT .S 3 2 3 1 ok /snip -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Development request
Hi. Comments? :-) Michael Am 19.02.2013 um 22:36 schrieb Enoch: G'day to you to you all, I found something that seems to me useful on http://www.4e4th.eu/ WIPE ( -- ) Back to original status. Stacks unchanged. uarea back to original. Having an asm based word which restores the system into its original Amforth state, both Flash EEPROM content, means that on-site code replacement can be done without a JTAG, etc. Comments? Thank you, Enoch. P/S Marker is not good enough: It does not restore the EEPROM. It removes itself after application. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Useful?
Hi Matthias. ... There is currently no way to switch between forth and machine code (that would be ;CODE btw) You may go from low to high level and back: code name (some code) ; -- jump to high level: ldi XL,low(pfa_forthISR) ldi XH,high(pfa_forthISR) jmp DO_NEXT pfa_forthISR: .dw XT_MAINWORD ; -- back to low level: .dw PC+1 ; next IP .dw PC+1 ; next cfa (more code ) end-code But be shure to save all registers you use if you do so. --- Enochs code is a macro, assembling one single instruction SBI into dictionary and naming it. Calling that word will execute the SBI instruction. Michael Am 14.02.2013 um 20:14 schrieb Matthias Trute: hi Enoch, I'd like to see this forum also offering code snippets, so here's my first humble attempt of harnessing the atomic bit manipulation instructions. : port:hi ( portadr bitno -- ) \ SBI swap $20 - 3 lshift or $9A00 or code , end-code Did you actually test this code? CODE is a parsing word that starts a new dictionary entry. There is currently no way to switch between forth and machine code (that would be ;CODE btw) Puzzled Matthias -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] inner interpreter operation.
Hi Wis. Since Matthias is bussy, maybe I can help out. Am 31.01.2013 um 21:37 schrieb Macomson, Wis: I'm new to this and I'm trying to understand the amForth inner interpreter. There are a couple of clarifications in the amforth Documentation, Release 5.1-wip,January 26, 2013 that would help a lot. To wit: (p. 9)EXECUTE Q: When is EXECUTE, um, executed? I'm not clear on what this is used for. ( xt -- ) EXECUTE If you put an execution token xt on the stack, you may EXECUTE that. It is used in the interpreter: Parse input stream for a forth word (word means string of ascii characters delimited by blanks, find that word in dictionary, get its xt on stack and then execute it. Investigate ACCEPT and INTERPRET in the source code. (p. 9)NEXT [ . . . ] This last step finally jumps to the machine code pointed to by the X scratch pad register. Q: To be clear, the machine code jumps to NEXT when it has completed. Correct? That is correct. 'Low level' forth machine code continues execution of forth on 'high level' that way. (p. 9)EXIT The code for EXIT (aka UNNEST) is the forth word EXIT in the dictionary. It reads the IP from the return stack and jumps to NEXT. The return stack pointer is incremented by 2 (1 flash cell). Q: I think EXIT pops the top of the return stack into the IP. That way, the second step of NEXT gets the correct value. Correct? So it is. If stack grows 'down' an increment by 2 drops one item - on a 8Bit machine with a 16Bit virtual forth machine on it. (p. 9)DO_DOES This code is the runtime part of the forth word DOES . It pushes the current address of the MCU IP register onto the returnstack and jumps to DO_DOES. DO_DOES gets that address back, saves the current IP and sets the forth IP to the address it got from the stack. Finally it continues with NEXT. Q. Is this effectively a subroutine call? Yes. (I think so.) It is used to define words, that create words of the same class. For exeample VARIABLE is such a word. You may create variables that all work the same. VARIABLE Y0 VARIABLE X12 VARIABLE MOON Such words are also called defining words. VARIABLE defines a new forth word, that has one cell of ram to hold an item. When this word is executed, it puts the address of its ram cell on stack - that is the 'subroutine' part of it. Michael Thanks for any light you can shed. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] From frt to asm
Hi, if you need any help with g4 just ask me. Michael Am 27.10.2012 um 20:13 schrieb Erich Waelde: Hi, On 10/27/2012 08:06 PM, Enoch wrote: Is there an automated method to compile frt to asm to skip uploading of debugged words? Have a look at http://www.forth-ev.de/repos/g4/ This is a gforth program to konvert forth source code to amforth-look-alike assembly. Cheers, Erich -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] From frt to asm
Hi Hannu. Am 27.10.2012 um 21:57 schrieb Hannu Vuolasaho: .. Am I right if I say it doesn't know my own assembler words? You are right. It knows a lot of amforth words which are ANS forth. As g4 is written in gforth adding more simple words is quite easy. Take a look at their syntax in those examples at the end of g4 source. And append more there. Michael Maybe there should be link on amforth web page to this tool. And if amforth-shell maintainer want to catch feature request I'd like to see this as part of it. Then it would be nice to save some words when shell would convert registers to addresses without including device.frt. Best regards, Hannu Vuolasaho -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel
Re: [Amforth] Bug
Hi. gforth: 0 0 10 within . -1 ok -1 0 10 within . 0 ok 9 0 10 within . -1 ok 10 0 10 within . 0 ok Michael Am 12.09.2012 um 14:43 schrieb Hannu Vuolasaho: Hello! I had standard : Secretariat Computer and Business Equipment Manufacturers Association Approved: March 24, 1994 American National Standards Institute, Inc. open in my browser and it says: 6.2.2440 WITHIN CORE EXT ( n1|u1 n2|u2 n3|u3 -- flag ) Perform a comparison of a test value n1|u1 with a lower limit n2|u2 and an upper limit n3|u3, returning true if either (n2|u2 n3|u3 and (n2|u2 = n1|u1 and n1|u1 n3|u3)) or (n2|u2 n3|u3 and (n2|u2 = n1|u1 or n1|u1 n3|u3)) is true, returning false otherwise. An ambiguous condition exists if n1|u1, n2|u2, and n3|u3 are not all the same type. See: A.6.2.2440 WITHIN Just for the record. Best regards, Hannu Vuolasaho Date: Wed, 12 Sep 2012 08:08:01 +0200 From: ew.fo...@nassur.net To: amforth-devel@lists.sourceforge.net Subject: Re: [Amforth] Bug Hello Artur, I think you are pointing to within not working as you expect. ver amforth 4.6 ATmega328P ok 0 0 10 within . -1 ok -1 0 10 within . 0 ok 9 0 10 within . -1 ok 10 0 10 within . -1 ok Looking into Conklin, Rather -- Forth Programmer's Handbook (3rd. Edition) p.59: WITHIN ( x1 x2 x3 -- flag ) return true if x1 is greater than or equal to x2 AND less than x3. ... So x3 is excluded in the true case. As you can see above, within in amforth includes x3. Now, someone needs to check The Standard. :-) Thanks for pointing this out. Cheers, Erich On 09/10/2012 04:31 PM, Arthur Ivanov wrote: Hi ! I think I see a bug in your AmForth v4.9. In file ..\core\words\to-lower.asm I see ; ( C -- c) ; String ; if C is an uppercase letter convert it to lowercase VE_TOLOWER: .dw $ff07 .db tolower,0 .dw VE_HEAD .set VE_HEAD = VE_TOLOWER XT_TOLOWER: .dw DO_COLON PFA_TOLOWER: .dw XT_DUP .dw XT_DOLITERAL .dw 'A' .dw XT_DOLITERAL .dw 'Z' .dw XT_WITHIN .dw XT_DOCONDBRANCH .dw PFA_TOLOWER0 .dw XT_DOLITERAL .dw $20 .dw XT_OR PFA_TOLOWER0: .dw XT_EXIT This will not convert Z chat to lower case. To fix you have to replace the string .dw 'Z' by the string .dw 'Z'+1 Ethereal -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel - - Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel