Posts: 8.743
Threads: 138
Joined: Apr 2013
Reputation:
3.629
"In my experience: Never ask a forth fan if something is possible. You'll get only one answer: yes, of course it is. "
Momci, (Vojče, Macola, Dragan), ko je "krio" ovo od nas sve ove godine ?
Naravno da ima, CUDA Forth na primer:
https://github.com/michelp/cudafor
Ili ovako nešto iz Google grupe:
Quote: IMHO, the most interesting development towards a Forth on the GPU is SPIR-
V, the virtual machine for Vulcan (and OpenCL). Conceptually, this
should be an umbilical Forth, so you write Forth code, which gets
translated into SPIR-V, and you can let it run as shader or compute core.
Posts: 8.743
Threads: 138
Joined: Apr 2013
Reputation:
3.629
01-31-2022, 04:03 AM
(This post was last modified: 01-31-2022, 04:21 AM by mikikg .)
Zanimljivo, nisam skorije radio sa nekim DAC-kićem koji ima ovavku inicialnu preciznost tj kada DAC dobije instrukciju da na primer postavi 110mV pa zatim relativno merenje i komanda za 120 mV i instrument pokaže ovo sa fotke a pri tome taj DAK-ić dolazi za nožice kontrolera i ima setling-time reda
2ns i sve se pokrece kroz FORTH tj u ovom konkretnom slučaju TAQOZ Forth na 8-core Propeller 2 kontroleru!
Imam problema sa brzinom opreme, najbrži FTDI 232R USB interface koji imam radi do 3MBaud-a asinhronu serisku komunikaciju, inače Propeller 2 radi do nekih 20MBaud : ) ... Inače ima auto-speed detekciju, tj ovaj kontroler se ne buni ni za jednu brzinu, šta imaš i kolko možes ti teraj ...
BTW: Da ne nabrajam šta sve ima u ovom TAQOZ i kakve sve podrške, samo kada sam video da je neko u tu verziju uključio i "drajver" za Si5351 Clock Generator, pomislio sam da se neko šali samnom!?
Attached Files
Thumbnail(s)
Posts: 8.743
Threads: 138
Joined: Apr 2013
Reputation:
3.629
A ako hoćete baš tačno da nabrajam šta sve ima u
TAQOZ Reloaded V2.5 za Paralax Propeller 2 , to se u FORTH kaže "WORDS" pa gledajte
Code:
TAQOZ# WORDS
1A592: C2B C2A C2? C2 C2FC@ C2>RAM C2READBLK .PORTS .C2REGS .C2 C2WB BDUMP C2RB? C2RB C2PROGRAM: C2ProgramBoot
-C2PROGRAM C2ProgramBlock C2VERIFY C2BUF C2ERASEP C2ERASE C2FLASH C2HALT C2DIR! C2REG! C2REG@
C2IBSY C2DATW! C2CMD C2FAIL C2FLG? C2ERR? C2FLG@ c2flg C2DATW@ C2ORDY C2ADR! C2STAT? C2DAT!
C2DAT@ C2READ C2INS C2WRITE C2WAIT C2WAIT? C2START C2STOP C2RESET .C2ERR c2errors C2PINS faddr
=BLKRD =FPDAT =FPCTL =DEVID C2D C2CK *C2* S Z W B M U N R SPLAT spsz LAKEY UPPER LAESC CTSHS
CTLS ALTS SHIFTS REFRESH SHELL LAHELP FINDMATCH SETchan SETZOOM SETWIDTH SETbaud SETms SETus
SETns SCALE! SETSCALE ps SETCUR SETTRIG PR FRAME NEWFRAME FOOTER @footer .SCALE ?PINS PINLOAD?
CAPTURE !ENTRY +ENTRY !KEY .LAD GRID .ROW .CURSOR ARMED STOPPED COND RUNNING ASCII? .LABEL
LABEL LAHUE EMITX pins clabels trig curadr lcur lbaud scale width samples snew newkey zoom
spvars SEND schan channels _schan _channels CAPBUF LIMIT CURSOR BOLD XY *SPLAT* GETROM RESET
TRAP _pc S GO STEPS SS STEP ID? CYCLES CYCLE DECODE@ OPCODES XXX BRK brkop NMI INT IRQ TYA
TXS TXA TSX TAY TAX RTS POPPC RTI JSR JMP.X) JMP.) JMP.A PLY PLX PLP PLA PHY PHX PHP PHA BEQ
BNE BCS BCC BVS BVC BMI BPL 1BRA 0BRA BRA SKIP SEI SED SEC CLD CLC CLI CLV DEC.A,X DEC.Z,X
DEC.Z DEC.A DEC INC.A,X INC.Z,X INC.Z INC.A INC DEX DEY DEC.ac INX INY INC.ac INCDEC TSB.Z
TSB.A TSB TRB.Z TRB.A TRB ROR.ac ROR.A,X ROR.Z,X ROR.Z ROR.A ROR >CARRY ROL.ac ROL.A,X ROL.Z,X
ROL.Z ROL.A ROL <CARRY LSR.ac LSR.A,X LSR.Z,X LSR.Z LSR.A CARRY: LSR ASL.ac ASL.A,X ASL.Z,X
ASL.Z ASL.A AS! ASL BIT.A,X BIT.Z,X BIT.Z BIT.A BIT.# RDBIT CPY.Z CPY.A CPY.# CPY RDCPY CPX.Z
CPX.A CPX.# CPX RDCPX LDY.Z,X LDY.A,X LDY.Z LDY.A LDY.# LDY RDLDY LDX.Z,Y LDX.A,Y LDX.Z LDX.A
LDX.# LDX RDLDX STY.Z,X STY.Z STY.A STY STX.Z,Y STX.Z STX.A STX STZ.A,X STZ.Z,X STZ.Z STZ.A
STZ STA.) STA.A,Y STA.A,X STA.Z,X STA.)Y STA.X) STA.Z STA.A STA.Z,Y STA SBC.) SBC.A,Y SBC.A,X
SBC.Z,X SBC.)Y SBC.X) SBC.Z SBC.A SBC.# SBC RDSBC ORA.) ORA.A,Y ORA.A,X ORA.Z,X ORA.)Y ORA.X)
ORA.Z ORA.A ORA.# ORA RDORA EOR.) EOR.A,Y EOR.A,X EOR.Z,X EOR.)Y EOR.X) EOR.Z EOR.A EOR.# EOR
RDEOR CMP.) CMP.A,Y CMP.A,X CMP.Z,X CMP.)Y CMP.X) CMP.Z CMP.A CMP.# CMP RDCMP DOSUB AND.) AND.A,Y
AND.A,X AND.Z,X AND.)Y AND.X) AND.Z AND.A AND.# AnD RDAND ADC.) ADC.A,Y ADC.A,X ADC.Z,X ADC.)Y
ADC.X) ADC.Z ADC.A ADC.# ADC RDADC LDA.) LDA.A,Y LDA.A,X LDA.Z,X LDA.)Y LDA.X) LDA.Z LDA.A
LDA.# LDA RDLDA IND ABY ABX ZPY ZPX IDY IDX ZPG AB IMM .REG .DAT .PC PUSHPC POP PUSH GETWORD
GETBYTE WRBYTE RDWORD RDBYTE .WORD: X! XC! XC@ X@ @6502 mem6502 LISTING LIST? _list XTAB SIMOUT
xpos SP@ PC! PC+! NL _nl PC@ NZ! PS! AC! AC@ !6502 NEG! CARRY@ CARRY! OVFLOW? SIGN? ZERO! ZERO?
TEST NEG OV BRKFLG DCM INH ZFLG CARRY PC SP YR XR PS AC C@+ BIT SETB RES *SIM65* CONLED PLEXCH
PLEXLED PLEX.TASK SCROLL scol ledbuf XYLED leds PLEXPIN plx *PLEXLED* TAP MORSE TAP: GAP MC@
_morse PITCH WPM _pitch dotms *MORSE* LIFE MENU COPY RANDOM ACORN DIEHARD LWSS FPENT GLIDER
SEED VOID SYNCH EXPANDING EXPAND WIDER SHRINK WIDEa WIDE SHOW .HEAD .WALL border wall uclrs
.line gentask nextgen U dead live zoom _exp syn ng generation cvars bufgen doline ROL3 r1 r0
#bits line bits/cell #lines _lines CELLS universe *LIFE* CONTINUE BREAKOUT ACTION GAMEKEY boflgs
SLOWER FASTER NEWGAME ALERT GAMEOVER ALERTBOX ?REBOUND ?BALL HIT? UP? LEFT? ?PADDLE .SCORE
NEWBALL HIDEBALL DRAWBALL SHOWBALL ballwh bally@ ballx@ bally ballx vely velx speedtmr speed
rem energy balls score ballw NEWPADDLE R L PADDLE? PADDLE py px ph pw BRICKS? WALLS BRICK?
BRICK# SMASH DRAWBRICK BAKE BRICKxy +mortar brickw #total #walls brickh #bricks mortar backwall
BORDER BANG SOUND BONK duration XY@ VGA> <VGA bk *BREAKOUT* MB3200 MBGO MANDEL ZOOM MANDELBROT
DOBROT ITS EXP DOROW DOCELL DOESCAPE COUNT? ZSQ INIT_VARS colexp maxcnts esccnt Zy Zx Cy Cx
#left #top =res #RESCALE SCALE #YVAL #XVAL #XSIZE #YSIZE #MaxIter *MANDELBROT* CG25 CGFREQ
!CG RDIV CGREGS CGREG! qc qb qa XTAL_LOAD_CAP PLL_RESET SYNTH_MS_2 SYNTH_MS_1 SYNTH_MS_0 SYNTH_PLL_B
SYNTH_PLL_A CLK2_CONTROL CLK1_CONTROL CLK0_CONTROL PLLX_SRC CLK_ENABLE_CONTROL =CG CG CG@ CG!
Si5351 *CLKGEN* ifup .LAN SERVER EASYNET !SERVER netcog RESTART ?EASYNET ?CMDS CMD: _cmd ?LED
?HTTP #hskts GET HEAD GETPAGE GETHTX GETTXT ?CONTENT CONTENT ?FTP ?FTPCON !FTPCON ftp$ ftp#
REST STOR RETR (RETR) RNTO RNFR RNFR$ FTPMSG SIZE SENDFILE BLKSEND BUFSIZ LIST ?DISCONNECT
PWD CWD cwd$ CDUP MDTM FEAT SYST PASV #ftpmax #ftpmin PORT TYPE type PASS USER ECHOREQ GETFNAME
dataport pass$ user$ .IPD COMMA .BYTEDEC GETTIME RESOLVE ?TELNET QUIT BYE STAT! constat CONNECT
DSCTD? DISCONNECT CONNECTED? DISCREQ disreq KEEPALIVE contd UpdateTXWR FlushSkt MSG> <MSG msgstk
MSGS msgs ledon ledcnt UNKNOWN COMPARE$ LOCATE$ LEDS LANLED READYLED @FWRITE netvars ALARM
TIMEOUT FSTAMP APPEND (cat) RIGHT$ RENAME$ FSIZE@ FILEIN *EASYNET* skt$ HTTP TELNET FTPDAT
FTP NETMAN ifconfig .SOCKETS .SOCKET .SKT .SKTHD SWAPB .@SKTBUF .PTR .IP .IP1 .IPX @SKTBUF
sktbuf LREADSKT vwrite vread LSEND WBUFSZ WIZ INPUT$ _get$ _get# getsz LANPOLL lanpolls LANCON
LANCONEMIT LAN LANKEY LANEMIT ?SENDPOLL ?SEND LANSEND WAITSEND txsize txtime !TXWR txwr@ @txwr
txwr CRLFS AUTOSENDS autosend !WIZ !TXBUFS !WIZIP oui2 !WIZIO WCOLD PORT! SetPORT sDISCON?
sCONNECTED? sCLOSING? sESTAB? sINACTIVE? sCLOSED? sRECV sSENDKEEP sSENDMAC sSEND sCLOSE sDISCON
sCONNECT sLISTEN sOPEN PPPoE MACRAW IPRAW UDP TCP CLOSED KEEPTMR RXWRITE RXREAD RXSIZE@ TXWRITE
TXREAD TXFREE@ sTXMEM sRXMEM sPRO sSSIZE sDPORT sDIP sDHAR sPORT sSTAT@ sINTS sCMD! sMODE &CON
&DISCON &RECV &TIMEOUT &SENDOK UPORT UIP @RCR @RTR INTMASK INTS@ SIP MAC SUBNET GATEWAY wMODE
@ports @wcold @mac @subnet @sip @gateway LWRITE LREAD L@ LW@ LC@ L! LW! LC! SOCKET SKT SKT@
skt2 @SOCKET @TX @RX SWC! @COMMON WRWIZ SWC WIZADR RDWIZ WIZPINS @wizpins BUFFER mySN myIP
myGW EE@ EE! eeprom CONIO MBXEMIT (MBXEMIT) _W5500 *W5500* :F6 :F5 :FB :FC P2PC PC CONKEYB
KEYB@ KEYB !KEYB kbb KEY#@ KBRK MAKE? RXKB kbtbl kbk kbs *PS2* P2EVAL CONVGA VEMIT VGA vcold
VCH VCH8 VCH8A _hp VCH4 VCH2 VCH1 CHAR++ FONTGEN VSCROLL NEWLINE VHOME TERM NS BOTTOM >VXY
VXY> row1 col1 VXY b/l _scrolls vflg row col csp CSP lsp LSP FONT5X7 *TEXT* SUBS GAMMA _th
gam/ gam* NEGATIVE N SHADOWS PALMASK COLORS BUTTON -BEST SLIDESHOW RESUME REPLAY WATCH LOAD-FRAME
BMV$ ?MEDIA-KEYS VIEW-FRAME VIEWH VIEWN VIEWF VIEWP FRAME+ FRAME- BSECTS frame skips wspd ?BOUNCE
NEGATE! BOUNCE hbounce vbounce SETWIN !WIN XRES YRES BMVBUF hwin vwin *BMV* >>| |<< PLAYALL
track PITCH FWD REW PAUSE TRACK$ PLAY$ PLAY PLAY# WAVE.TASK ?WAVE GETWAV PLAY.TASK dacbits
PLAYBUF AUDIO AOUT STOP OPEN-EXT$ VOL vol* vol/ lch rch wavflg _pitch samrate wavsz wavsect
wavbuf2 wavbuf wavblk# ROUT LOUT *WAVE* MODULATE WAVES PLOTWAV scrbl ax ao FBSAVE FBGRAB BMPTBL
BMPHDR VIEWSEC VIEW$ VIEW OPEN.BMP$ V$ VFLIP *BMP* SHOW BLANK FRAMES SYNCH LUMA lm VFILL CLRSCR
BOX PANEL FRAME RECT VLINE HLINE LINETO X+- Y+- Y2 X2 BR BL TR TL PEN> >PEN _pen1 _paper1 PLOT
PIXEL! PLOT8 PLOT1 tex @XY CENTER Y+! X+! !XY XY! XY@! Y@ X@ h w y x scr* height width _y1
_y _x1 _x -VGA -MONO -C64 -TERM -MAC !PAL PAL2 PAL1 !COL >RGB RGB> SCREEN vgadac REVERSE PLAIN
brown gray coal white magenta cyan blue yellow green red black P&P PAPER@ PAPER PEN@ PEN rm
scrsz SETBMP 900p 768p 384p 540p V148 1080p 144p 180p 360p V74 720p 384v V65 768v 300v V40
600v 120v 240v V25 480v V/2 .VGA !VGA VSYN vms HSYN VCLK VRES V/ BPP BPP@ SCR PAL rows cols
VW@ V@ VW! V! vcnt hcnt vint BMP tim *TIM* LISTING ASM: FORTH: doNEXT END-CODE end TIA: CODE
ASSEMBLER *TIA* MAIN ~E ~B ~D ~W ~? ~Y ?? SYSINFO .DEVICES .USAGE .UBYTES SFBYTES lsi2c .I2C
.ASBYTES .MODULES CRLF+ ?PINS ?PIN FCACHE SRRDS srinc .SR SRID SR! SRW! SRC! SRWRS SRWRP !SR
SRRD SR SR@ SRW@ SRC@ *SPIRAM* RECLAIM STRIP STRIPIT DECOMP SEENFA SEE SEECFA ?NAME .NAME ?THENS
.SEE ?LOOPS ?DOS CASE? ?GOTO .LCON ?CRLF fad? if? -if +if .LIT .W10 -ind +ind INDENT .STR .M:
.ASC .D $ 'EMIT (DS) (LC) (.") (AS) (") (S) (R) (IF) (L) (W) SEE@ xcfa @SEE @SEE+ @SEE++ eflg?
dflg? wsrc wptr wnfa wcode ind ex ifs dflg *DECOMPILER* .FDT .TIME .DAY .DATE .DT .6 DAY@ DATE@
TIME@ DT@ BCDDEC DATE! DAY! TIME! UTIME! UTIME@ RTC !RTC I2CLOAD RDRTC rtcbuf I2CREG@ RTC@
I2CREG! RTC! RTCB! RTC? *RTC* I2C.KHZ I2C I2CC@ I2CRDREG nakI2C@ I2C@ I2C! I2CWR I2CRD I2CRD?
i2cdev <I2C> I2C> BU BACKUP$ BACKUP BU! MBR! BIX LISTBLOCKS EDITBLOCK VK .EDIT bn .BLOCK FORMAT
FORMAT.ROOT .DISK .FREE .FAT .PS .res FORMAT.FAT !FATS !FATX !FSINFO #s/c CLSZ .MBR .MB .MBS
FORMAT.MBR .CHS ?FS .SD .SPEEDS .SPD *DISK* QV cat RENAME RENAME! RENAME# FLOAD DEL-FILE pwd
CD cwd OPEN-FILE OPEN-FILE$ FOPEN REOPEN-FILE FOPEN$ MAKE mk$ mk ClaimClusters FreeDir? FFIND
FOPEN# >F83 GETF$ file$ -fsize -fclstl -fdate -ftime -fclsth -fadate -fcdate -fctime -fcms
-atr -ext -fname dirbuf FWRITE FREAD FGET FLOADS ls .LIST (.LIST) (SLIST) (DIR) udir lscnt
ACTIVE? .FNAME .FTIME .FDATE .ASMONTH .FYEAR DIRW .DIR DIR .ENTRY .DATE .DECX GAP .NAME @DIR
@FNAME MOUNTED? ?MOUNT MOUNT GETFAT ?FREE FSIZE@ @FSIZE S>D I>S S>C# S>C C>S2 C>S D>S D>C I>D
#C FreeClusters? CLUSTER@ @CLUSTER FAT2 FAT1 CD# FCLOSE CLOSE-FILE OPEN-SECTOR CWD ROOT FATSZ
@FAT @BOOT CWD! @CWD @ROOT SD SDC! SD! SDC@ SDW@ SD@ SDADR @OPEN @FILE SECTOR SECTORF SDRDS
SDWAIT SDRDX SDRD SDRDBLK FLUSH ?FLUSH SDWRS SDWR SDWR? B>S RW? RWS RWC RW wm RO .OCR .CSD
.TRANS .TACC TACC tval .xs .CURRENT .ma ma .CARD .CID .MFG .TITLE .*** .LINE@ .LINE !SD !SD!
BITS@ CSD@ XSHR SDDAT! SDSTAT DAT? ACMD SDRES CMD TOKEN SDCLK3 RELEASE SDCLK SD? !SDIO SDPINS
SDSPI SDCS SDDO SDDI SDCK SDBUF+ !SDBUF SDBUF fsize fcl fdate ftime fch f? cwd$ fatsz sdsz
cwdsect fat2 fat1 cwdir rootdir mksiz used% freecl usedcl lastcluster freeclusters volname
serial extsig ldn bbsect infosect rootcl fat? s/f s/p hidden media fats rsvd s/c b/s oemname
fat32 parsig parts bitbuf blklen sdhc fq file# wrens wrflg sdcmd _fkey mntd _fwrite _fread
opensect filesect readsect seccrc sdsum @sdwr @sdrd sdsize csd cid ocr sdvars *EASYFILE* VOLTS@
SETADC AMIN AREF aref amin ADC V DAC HILO PULSES PULSE PW SMPS TRI PWM! PWM BLINK DUTY SETNCO
NCO HZ KHZ MHZ MUTE WRFNC NSCNT NCOCNT OPEN-DRAIN SINK SOURCE !OUT !IN PINM 14P CLOCKED OPEN
10ua 100ua 1ma 150K 15K 1K5 FAST *SMARTPINS* FILTER! CRUISE CLKMHZ! RCFAST RCSLOW !CLKHZ CLKHZ1!
CLKHZ! HZ! clkfreq CLKMHZ USEXTAL USEPLL CLKSRC +SS PLLDIV +PPPP VCOMUL XIDIV PLLOFF PLLEN
CLK! pf +CC CLKSET _fin _clk *P2CLOCK* CONBAUD RXD TXD BAUD -bit dl fibos fibo module HERE:
TABLE MBXEMIT CONOUT +BUF =BUF bufsz bufwr bufptr NULL KEY: EMIT: TABS TAB .SUCCESS .OK .io
.DEC2 PINS PIN _pinmode DUMPZ dz .CONS .VARS .CONVARS .CV .CTRLS WORDS MWORDS MOD? LWORDS CFA>NFA
.NFA PAGE0 >! $+ X$ C$= $= a>A .MEM U.R D.R D. .DP >STR .DECS D.DECS #S, #c .BYTES .BITS SPINNER
_sp _el REVECTOR +-! | w ~b ?UNTIL TIMEOUT? TIMEOUT +POLL POLL: !POLLS POLLS VOCAB (VOCAB)
SEARCH-VOCABS +VOCAB @VOCAB FORTH vocabs #vocabs EVALUATE EVALKEY nx' CALL$ -> <- %white %cyan
%magenta %blue %yellow %green %red %black %WRAP %BOLD %REVERSE ATR %PLAIN asw %CURSOR %ERLINE
%ERSCN %CLS %XY .PAR CUR %PAPER COL %PEN ESCB %HOME ESC *ANSI* LOCAL REMOTE PAGER .HERE PROMPT!
.M TRACE! RUN: RUN 1M 64KB _vspin _vgacfg _baud _clkcfg _cpuhz _xin KBDAT KBCLK CLKDLY CLKREG
INB INA OUTB OUTA DIRB DIRA PTRB PTRA PB PA IRET1 IJMP1 IRET2 IJMP2 IRET3 IJMP3 TAQOZ# AT ==
^ !& & *** ALIAS CPA! VEC0 *EXTEND* DUP OVER 3RD 4TH OVER+ SWAP ROT -ROT ROT4 -ROT4 DROP 2DROP
3DROP NIP 2SWAP 2DUP ?DUP AND ANDN OR XOR NOT ROL ROR ROR? >> << SAR 2/ 2* 4/ 4* 16<< 8<< 9<<
16>> 8>> 9>> REV REVB |< >| BMASK 1& >N >B >9 >W BITS SIGN HUBEXEC = <> 0= 0<> 0< < U< > U>
<= => WITHIN DUPC@ C@ W@ @ C+! C! C@++ W+! W! +! ! M! D@ D! DWIDTH BIT! SET CLR SET? 1+ 1-
2+ 2- 4+ + - b++ UM* * W* LW* DM* / U/ U// UM/ // */ U*/ UM// QROTATE QVECTOR LOG EXP C++ C--
W++ W-- ++ -- RND GETRND SQRT SETDACS ~ ~~ W~ W~~ C~ C~~ L>S L>W W>B W>L B>W B>L MINS MAXS
MIN MAX ABS -NEGATE ?NEGATE NEGATE -1 ON TRUE FALSE OFF GOTO IF ELSE THEN BEGIN UNTIL AGAIN
WHILE REPEAT SWITCH CASE@ <CASE> BREAK CASE ADO DO LOOP +LOOP UNLOOP FOR NEXT ?NEXT I J LEAVE
?LEAVE IC@ I+ BOUNDS H L T F R HIGH LOW FLOAT MSBOUT LSBOUT MSBIN PIN! PIN@ WRPIN WXPIN WYPIN
RDPIN RQPIN AKPIN RDPINC WAITPIN WRACK pIN @PIN WAITX SETCT1 WAITCT1 REBOOT RESET 0EXIT EXIT
EXIT; NOP EXECUTE CALL JUMP COGMOD LOADMOD >R R> >L L> !SP DEPTH P2? COG@ COG! LUT@ LUT! COGID
COGINIT COGSTOP NEWCOG COGATN POLLATN SETEDG POLLEDG BMP CLKMHZ KEY WKEY KEY! KEY@ keypoll
CON MOUT NONE COM CTRL! DISCARD CONKEY CONEMIT SEROUT MBX MBO .EMIT EMIT EMITS EMIT! EMIT@
CRLF CR CLS SPACE SPACES RAM DUMP! DUMP DUMPW DUMPL DUMPA DUMPAW QD QW ?ERROR CONSOLE PROMPT
DEBUG lsio TRACE UNTRACE COG LUT KB MB M . PRINT .AS .AS" .DECL .DEC4 HOLD #> <# # #S <D> U.
.DEC .BIN .H .B .BYTE .W .WORD .L .LONG .ADDR .ADRX PRINT$ LEN$ UPPER$ " ." PRINT" CTYPE NUMBER
?EXIT ERASE FILL CMOVE <CMOVE LMOVE s ms us CYCLES DELAY DELAYS INS CNT@ LAP LAP@ .LAP .LAPS
.CLK .ms HEX DEC BIN .S W wORDS @WORDS GET$ SEARCH ufind $># uprompt uaccept unum uemit ukey
delim names TASK REG @WORD SPIN || , [W] ["] NULL$ $! $= (ASM) (CODE) FIND$ FORGET CREATE$
CREATE: VAR pub pri pre public private : ; [ ] ' := :=! ALIGN DATCON ALLOT HERE @HERE @CODES
SETORG uhere uwords flags orglen org@ !org org bytes words longs byte word long res [C] GRAB
[G] NFA' NFA+ CPA CFA \ --- ( { } IFNDEF IFDEF .VER TAQOZ MSAVE MLOAD FL TERM AUTO SPIRD SPIRL
SPIWR SPIWB SPICE SPIWC SPIWW SPIWM SPIWL SPIPINS SPIRX SPITXE SPITX CLKS TXDAT I2C.STOP I2C.START
I2C.RESTART I2C.WR I2C.RD WAIT CLKDIV RCSLOW HUBSET WP WE CLKHZ ERROR SFPINS SF? SFWE SFCMD
SFWD SFSID SFJID SFER4 SFER32 SFER64 SFER SFERP SFWRP SFBU SFRE SFRDS SFWRS SFC@ SFW@ SF@ SF
.SF *SPIFLASH* outbox inbox BUFFERS @VGA END 2332 --- ok
TAQOZ#
Interaktivni assembler, VGA podrška, PS/2, uSD kartice, bruka ... u oko 60kB interaktivnog Forth-a u 8-paralelnom radu ...
Posts: 6.315
Threads: 56
Joined: Mar 2013
Reputation:
3.085
Obzirom da P2 ima 64 IO pinova, i neka bude da upotrebimo 10 za uSD, konzolu, neku memoriju, ostaje još 54 slobodnih pinova, od kojih SVAKI i svi odjednom, mogu biti: adc, dac, IO, komparatori, digitalna logika i još gomilu funkcija golih smart pinova, a bez bitnog angažovanja jezgara.
P2 ima jako moćan hardver smart pinova, plus što ima 8 jezgara koji praktično rade istovremeno (samo prvih nekoliko taktova treba da se ulanči bafer i posle su istovremeno angažovana).
Sam Forth zahteva drugačiji način razmišljanja od ostalih jezika i apsolutna je greška da pokušate neki svoj kod (npr C i td...) da "preradite" na Forth.
Dobićete daleko lošije performanse od maksimalnog rezultata. Treba drugačije razmišljati iz korena.
Kod Forth je dobro iscepkati masivniji kod na više sitnih reči, koje ograničeno u jednom mahu koriste stek, a na taj način se maksimalno izbegava pravljenje i upotreba varijabli i štedi se jako na vremenu izvršenja...
Takođe, za razliku od mase ostalih jezika, ovde možete imati gomilu povratnih vrednosti iz "funkcije", tj. iz REČI.
Broj povratnih vrednosti je praktično ograničen samo dubinom steka.
Posts: 8.743
Threads: 138
Joined: Apr 2013
Reputation:
3.629
07-14-2022, 04:27 PM
(This post was last modified: 07-14-2022, 04:36 PM by mikikg .)
Uspeo sam da spojim minimalni Forth koji sam postavio
ovde sa Qt-om.
Vrlo interesatna priča, prvo što to odprilike da to niko nije probao niti koristio (osim jednog rusa, administrator nekog foruma : ), drugo što mi je trebalo od same ideje i pomisli da tako nešto uradim i poteram neki osnovni koncept odprilike manje od jednog dana, treće radi mnogo dobro, četvrto kako se to "bezobrazno dobro" integriše i kako se prelepo skače iz konteksta u kontekst preko stack-a, peto Qt (C/C++) je postao napokon interaktivan kada mu se ubaci Forth interpreter i napokon mogu da izvršim sekvencu komanti poput ove koja se zove "skok" koja hvata nekoliko Qt kontrola i "klikne ih" u razmaku od jedne sekunde, da mi preskoči tamo neke korake da ne moram ja stalno to da klikćem ručno ...
Code:
": skok fl click 1000 msleep gotit click 1000 msleep usb click ;\n"
Attached Files
Thumbnail(s)