6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 05, 2024 8:02 pm

All times are UTC


Search found 6059 matches
Search term used: forth Search these results:

Author Message

 Forum: SBC- Series Projects   Topic: 65ALL, all-in-one 6502 SBC

Posted: Sun Mar 31, 2024 5:59 pm 

Replies: 24
Views: 18675


... huge, but a component can be placed in the back, if that's any consolation. I plan to port DOS/65 and port an text editor so I can use it to learn Forth. Bill

 Forum: Nostalgia   Topic: ROM: How did they do it?

Posted: Sun Mar 31, 2024 3:40 pm 

Replies: 6
Views: 4437


... computer was my grotesquely modified KIM-1 , augmented by a home-brew floppy-disk system. And my homebrew MCS48 assembler was written in 6502 FIG Forth. :P Appropriate -- for me, at least -- to see the 8748 mentioned in a thread in the Nostalgia section! -- Jeff

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Tue Mar 26, 2024 12:52 pm 

Replies: 84
Views: 39920


There is a problem with the Pi calculator program on some systems. The word "four" evaluates to a negative number on a 16 bit signed 2s complement binary system. Changing the divide in the word "quotient" from signed to unsigned can fix this problem. Thanks for the correction. I...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Tue Mar 26, 2024 2:26 am 

Replies: 84
Views: 39920


There is a problem with the Pi calculator program on some systems.
The word "four" evaluates to a negative number on a 16 bit signed 2s complement binary system.
Changing the divide in the word "quotient" from signed to unsigned can fix this problem.

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Mon Mar 25, 2024 1:59 pm 

Replies: 84
Views: 39920


* While iterating a single cell I use multiply row * width nine times. Even on modern hardware integer multiply is about five times more costly than addition. Reusing the first multiply would be better. Update: I realized that if row enumeration added width instead of 1 I would effectively by multi...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 3:09 pm 

Replies: 84
Views: 39920


@BDD, I wondered about flyback diodes. I have never used relays for digital logic, but I have used them with microcontrollers to switch higher voltages, and the circuit I copied had a flyback diode. A flyback diode is de rigueur if a relay is being driven by a solid-state device.  Even a 5-volt rel...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 2:14 pm 

Replies: 84
Views: 39920


@All, thanks for the kudos. Also, the 355 / 113 approximation is one of those better than it has any right to be ways to calculate pi. Using it a PDP-8 could accurately calculate all manner of things in only 12 bits. @barnacle, I saw that video as well, which prompted me to write this program. I int...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 12:13 pm 

Replies: 84
Views: 39920


Youtube threw this at me a couple of days ago: https://www.youtube.com/watch?v=SPTzzSuBFlc It calculates pi by the same mechanism (I think!) using relays... My first large-scale electronics project was a relay “computer,” built over 60 years ago using long-frame cradle relays and stepping relays, b...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 8:02 am 

Replies: 84
Views: 39920


... I posted a Basic program over here to understand the approach better - I also posted a simplified version, perhaps it would be amusing to redo in Forth.) Some readings: Nilakantha's formula for pi (very very brief elaboration) Nilakantha, Euler and pi by Shailesh A Shirali (1997), quite accessible, ...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 7:09 am 

Replies: 84
Views: 39920


... pi to six places: 3,14159292. How often would one need to go beyond that (it's two metres out calculating the equator!)?. I think I learned Forth's */ from Brodie using that example.) 355/113 is off by only +8.5E-8.  65298/20785 is only slightly better, at -5.1E-8.  I have a bunch of rational-number ...

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 7:01 am 

Replies: 84
Views: 39920


... pi to six places: 3,14159292. How often would one need to go beyond that (it's two metres out calculating the equator!)?. I think I learned Forth's */ from Brodie using that example.)

 Forum: Forth   Topic: CS-101 problems and their FORTH solutions.

Posted: Sun Mar 24, 2024 1:43 am 

Replies: 84
Views: 39920


Happy belated pi day! My latest CS-101 Forth program computes pi using 16 bit fixed point arithmetic. Link in github: https://github.com/Martin-H1/Forth-CS-101/blob/master/pi.fs When run it produces this output: pi ok 2 .s <2> 25733 8192 ok ...

 Forum: Forth   Topic: A Finite State Machine Engine in Forth

Posted: Thu Mar 21, 2024 12:55 am 

Replies: 13
Views: 10487


I'll need to read the IsoPod manual again to see if the following is a feature or just a side effect of my implementation. It is possible for one finite state machine to directly affect which machine state another machine will run. STATE-MACHINE M1 ON-MACHINE M1 APPEND-STATE GREEN.BORDER APPEND-STA...

 Forum: Forth   Topic: A Finite State Machine Engine in Forth

Posted: Sun Mar 17, 2024 8:24 pm 

Replies: 13
Views: 10487


... machine state for this transition does not take place either. When defining a state transition for a machine state, until CONDITION executes, the Forth system is interpreting. CONDITION does not compile any kind of branch. It takes the PFA of a machine state on the data stack. If this is the first ...

 Forum: Forth   Topic: A Finite State Machine Engine in Forth

Posted: Sun Mar 17, 2024 6:09 am 

Replies: 13
Views: 10487


One change I would make is change the word CONDITION to IF and the word CAUSES to THEN.

Or do you not like IF/THEN statements any more? Or are they not same?
Sort by:  
Page 3 of 404 [ Search found 6059 matches ]


All times are UTC


Jump to: