From: pito <pi...@vo...> - 2012-06-19 12:20:06
|
Jan, have a look on this email in archive (Apr/2011 Fast I/O library) http://sourceforge.net/mailarchive/forum.php?thread_name=a71bc0d107a67536b9d4125600d71090%40mail2.volny.cz&forum_name=amforth-devel There are the bitnames words written in asm, ~4x faster then with asm tokens, ready to include. Pito ----- PŮVODNÍ ZPRÁVA ----- Od: "pito" <pi...@vo...> Komu: kro...@ho..., amf...@li... Předmět: Re: [Amforth] Where to store my word? Datum: 18.6.2012 - 16:14:43 > Jan, > the bitnames.frt words are better to be rewritten > into assembler. > You need a fast pin manipulation on an MCU I would > say. Your attempt > to translate it into "asm tokens" is wasting the > time (unless you > are doing it for educational purposes mainly).. > p. > > ----- PŮVODNÍ ZPRÁVA ----- > Od: "Jan Kromhout" <kro...@ho...> > Komu: amf...@li... > Předmět: Re: [Amforth] Where to store my word? > Datum: 18.6.2012 - 16:02:38 > > > > > Dear Michael, > > > > I try to convert the lib bitnames.frt. > > See the results here. > > There is going sommething wrong, but get not the > > finger behand it. > > I have used the latest version. > > Please can you take a look? > > > > Cheers, > > > > Jan > > > > FLOAD > > '\\psf\Home\Documents\amforth-4.8\amforth-4.8\lib\bitnames.frt' > > > > > ; V 1.3 02.11.2007 > > ; Code: Matthias Trute > > ; Text: M.Kalus > > ; A named port pin puts a bitmask on stack, > > wherin > > > the set bit indicates which > > ; bit of the port register corresponds to the > > pin. > > > > > ; And then puts the address of its port on stack > > too. > > ; Use it this way: > > ; PORTD 7 portpin: PD.7 ( define portD pin #7) > > ; PD.7 high ( turn portD pin #7 on, > > i.e. set it high-level) > > ; PD.7 low ( turn portD pin #7 > > off, > > > i.e. set it low-level) > > ; PD.7 <ms> pulse ( turn portD pin #7 for > > <ms> high and low) > > ; the following words are for "real" IO pins > > only > > > ; PD.7 pin_output ( set DDRD so that > > portD > > > pin #7 is output) > > ; PD.7 pin_input ( set DDRD so that > > portD > > > pin #7 is input) > > ; PD.7 pin_high? ( true if pinD pin #7 > > is > > > high) > > ; PD.7 pin_low? ( true if pinD pin #7 > > is > > > low) > > ; > > ; multi bit operation > > ; PORTD F portpin PD.F ( define the lower > > nibble > > > of port d ) > > ; PD.F pin@ ( get the lower nibble > > bits ) > > ; 5 PD.F pin! ( put the lower nibble > > bits, do not change the others ) > > .dw XT_HEX > > ; At compiletime: > > ; Store combination of portaddress and bit > > number > > > in a cell and give it a name. > > ; At runtime: > > ; Get pinmask and portaddress on stack. > > VE_PORTPIN:: > > .dw $FF08 > > .db "PORTPIN:" > > .dw VE_HEAD > > .set VE_HEAD = VE_PORTPIN: > > XT_PORTPIN:: > > .dw DO_COLON > > PFA_PORTPIN:: > > : portpin: create ( C: "ccc" portadr n -- ) ( R: > > -- pinmask portadr ) > > ^ > > Warning(-4100): ( is redefined in file > > \\PSF\HOME\DOCUMENTS\AMFORTH-4.8\AMFORTH-4.8\LIB\BITNAMES. > > > RT at line 32 > > ; create: > > VE_(: > > .dw $FF01 > > .db "(",0 > > .dw VE_HEAD > > .set VE_HEAD = VE_( > > XT_(: > > .dw PFA_DOCONSTANT > > PFA_(: > > : portpin: create ( C: "ccc" portadr n -- ) ( R: > > -- pinmask portadr ) > > ^^^^^ > > Error(-13): "CCC" is undefined in file > > \\PSF\HOME\DOCUMENTS\AMFORTH-4.8\AMFORTH-4.8\LIB\BITNAMES. > > > RT at line 32 > > > > > > > > > > > > > > > > > Date: Sun, 17 Jun 2012 23:21:59 +0200 > > > From: mik...@go... > > > To: amf...@li... > > > Subject: Re: [Amforth] Where to store my word? > > > > > > Hi Jan. > > > .. > > > > I also not find the win32 forth version any > > > > more! > > > > > > Please can you take a look! > > > > > > Its still there and updated: > > > http://www.forth-ev.de/repos/g4/g4w32f.fs > > > > > > m > > > > > > ------------------------------------------------------------------------------ > > > > > > > > > > > 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/ > > > > Amf...@li... > > > 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/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > -- > - - Reklama - - - - - - - - - - - - - - > Maturity, přijímací zkoušky, státnice, diplomky... > Vše o závěru > studia na středních a vysokých školách čtěte na > portálu VOLNÝ.cz na > http://bit.ly/LfImCR > > -- - - Reklama - - - - - - - - - - - - - - Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na http://bit.ly/LfImCR |