Menu Program
Archiver
Posts: 46,084
Hello
I am interested in writing a menu driven program using basic stamp2.
for example..
1. set the port 0 high
2. set the port 0 low
3. set the port 2 high
4. set the port 5 low
5. Quit the program
enter the numer:
for above example if user input is 1 then port 0 will be high and so
on. if anyone could help me and guide me what kind of code i need to
display the above example, I would appreciate it.
thanks
Selma
I am interested in writing a menu driven program using basic stamp2.
for example..
1. set the port 0 high
2. set the port 0 low
3. set the port 2 high
4. set the port 5 low
5. Quit the program
enter the numer:
for above example if user input is 1 then port 0 will be high and so
on. if anyone could help me and guide me what kind of code i need to
display the above example, I would appreciate it.
thanks
Selma
Comments
selmat@y... writes:
> for above example if user input is 1 then port 0 will be high and so
> on. if anyone could help me and guide me what kind of code i need to
> display the above example, I would appreciate it.
> thanks
>
Try this:
start:
serout 16, N9600, [noparse][[/noparse]Enter command, cr]
serin 16, N9600, [noparse][[/noparse]com]
if com = "1" then fireone
if com = "2" then firetwo
if com = "3" the firethree
go to start
and so on.
The subroutines would contain the instructions to do what you want. For
instance
fireone:
high 1
goto start
Sid Weaver
W4EKQ
Port Richey, FL
[noparse][[/noparse]Non-text portions of this message have been removed]
thanks much
--- In basicstamps@yahoogroups.com, Newzed@a... wrote:
> In a message dated 5/26/2003 8:48:12 AM Eastern Daylight Time,
> selmat@y... writes:
>
> > for above example if user input is 1 then port 0 will be high
and so
> > on. if anyone could help me and guide me what kind of code i
need to
> > display the above example, I would appreciate it.
> > thanks
> >
>
> Try this:
>
> start:
> serout 16, N9600, [noparse][[/noparse]Enter command, cr]
> serin 16, N9600, [noparse][[/noparse]com]
> if com = "1" then fireone
> if com = "2" then firetwo
> if com = "3" the firethree
> go to start
>
> and so on.
>
> The subroutines would contain the instructions to do what you
want. For
> instance
>
> fireone:
> high 1
> goto start
>
>
> Sid Weaver
> W4EKQ
> Port Richey, FL
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]