Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:11 18 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : BASIC commands

Author Message
spock181
Newbie

Joined: 24/08/2011
Location: Australia
Posts: 1
Posted: 01:50pm 24 Aug 2011
Copy link to clipboard 
Print this post

USR() or CALL

The CALL statement is recommended for interfacing assembly language programs with GW-BASIC. Although the USR function may also be used.

Is there a reason for leaving it out in MMBASIC?

I remember embedding machine code in REM statements in exidy basic.
when you really wanted something time critical.

I can imagine programming an input pin to interupt, with a jump to
a line with a USR() function to process some high speed sampling and then return.
Scanning of an input pin would then occur at maximum processor speed.

I used to do my software uart (RS232) comms like that on an 8085 interupt.
which allowed 9600baud coms on a 2Mhz 8085 (roughly 1 byte per millisecond)

Am I off the mark thinking this is something that could be implemented.
(maybe not assembly programs but binary code execution might be useful)
 
planet42
Newbie

Joined: 25/08/2011
Location: Australia
Posts: 5
Posted: 01:22am 25 Aug 2011
Copy link to clipboard 
Print this post

To speed things up with the maximite (MM) you could program it in C rather than MMBASIC.

I enquired about this to Geoff Graham (the designer of the MM) to see if I could program it in C, since I've been a C/C# programmer for years now. (Once you know C you never want to use BASIC script. The difference for me is like driving on a smooth highway and then suddenly hitting a road full of potholes :)).

He said that the whole firmware is written in C including MMBASIC, and that you would still have access to the video and keyboard routines, so that it would give me everything I wanted. He also mentioned the firmware source is available for download at the Silicon Chip website or direct from Geoff at http://geoffg.net/maximite.html .
 
seco61
Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 205
Posted: 04:00am 25 Aug 2011
Copy link to clipboard 
Print this post

Hi Frank.

The facility to execute your own custom code (ie routines written in C - or even assembler using C's ability to call assembler code) is provided by utilising the custom.c and custom.h files.

I have done an implementation using the onboard Output Compare modules to provide a high speed and zero overhead PWM capability.


Regards

Gerard (vk3cg/vk3grs)
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024