CodeWalrus

General => General Help & Troubleshooting => Topic started by: xMarminq_ on November 01, 2016, 01:00:24 am

Title: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 01, 2016, 01:00:24 am
Please put tips here.
O.O
I will try my best to read and lean so I don't sound stupid on here.
CE is best.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 01, 2016, 01:31:37 am
learn TI-BASIC or C

do not learn ASM yet if you are a beginner


*edit*

@xMarminq_ try this

http://tibasicdev.wikidot.com/sk:first-program (http://tibasicdev.wikidot.com/sk:first-program)
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: DJ Omnimaga on November 01, 2016, 02:34:08 am
Depends, but generally, TI-Basic Developer wiki is the first place you should go at to learn. The TI-84 Plus CE guidebook on TI website can be handy as well, but not as complete. It also provides some examples. You also need to start small, not with a big JRPG or something.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Unicorn on November 01, 2016, 04:39:09 am
Try to create a random number program, then a guessing game, using the TI-Basic Dev Wiki for reference for commands. That is what I did. If you have other programming experience, I suggest learning C and then installing the toolchain for the CE. About ASM, it really isn't needed unless you want to do some heavy stuff with the calc, C will be fast enough for games.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 01, 2016, 05:50:58 am
ASM is way too difficult for most
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Hayleia on November 01, 2016, 07:00:34 am
Quote from: kotu on November 01, 2016, 05:50:58 am
ASM is way too difficult for most

ASM is way too difficult for most people who already learned another language and are used to thinking high level. FTFY.
Not saying it's easy for people who never learned any language, but really, I've even seen people who grew up with Java complain when they learned C even though they're both imperative and with a readable syntax (though I agree that Java may have more facilities than C, Java vs C is still far from Basic vs ASM...), so it's obvious that a big part of the problem is people being used to other ways of thinking.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 01, 2016, 07:02:41 am
also, i wouldn't really recommend ASM to a beginner, as it will make it very slow to write proper programs or big programs.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Juju on November 01, 2016, 07:04:51 am
Go in every menu and try everything. That's how I learned BASIC.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Hayleia on November 01, 2016, 07:06:47 am
Quote from: kotu on November 01, 2016, 07:02:41 am
also, i wouldn't really recommend ASM to a beginner, as it will make it very slow to write proper programs or big programs.
On the contrary, I totally would. This way, they'd understand concepts such as pointers very easily due to not having "complicated structures that do the job for them" everywhere...
Then yeah, they'll become fed up with it due to having to spend too much time to write even simple things, but they'll be able to move on to anything they like.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 01, 2016, 07:15:22 am
And to properly learn it you have to learn like over 250 instructions.... i wanted to learn z80 but I couldn't really be bothered.... don't see much to be gained.

However you are right I am very used to C++/STL.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Snektron on November 01, 2016, 07:18:49 am
You don't need to see it as 250 instructions. There are only like 30 different opcodes or so. The numbers you speak about come from the different numbers of combinations of instructions (ex ld a,(hl) and ld b,(hl)) which are prettt easy to remember.

Plus i have an opcode list open too when i program assembly :P
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Hayleia on November 01, 2016, 07:21:08 am
On the contrary, there are far less instructions in ASM than in other languages. That's why it's "hard" actually, because where you'd have an instruction for every purpose in other languages (this is an exaggeration), you have to find the way to get the same result by combining the very few instructions you're given in ASM.

edit Yeah, what @Snektron said. It's as if you counted "a=b" in C as a different instruction than "b=c", even though that's just assignment.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 01, 2016, 07:47:01 am
from what i understood there were about 250 actual instructions, but they only really counted as about 150
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: Snektron on November 01, 2016, 11:18:09 am
There are actually like 700 actual instructions
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 02, 2016, 01:17:52 am
well in that case there are 65536 instructions, plus 11, minus 6
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: DJ Omnimaga on November 02, 2016, 02:22:07 am
Quote from: Hayleia on November 01, 2016, 07:00:34 am
Quote from: kotu on November 01, 2016, 05:50:58 am
ASM is way too difficult for most

ASM is way too difficult for most people who already learned another language and are used to thinking high level. FTFY.
Not saying it's easy for people who never learned any language, but really, I've even seen people who grew up with Java complain when they learned C even though they're both imperative and with a readable syntax (though I agree that Java may have more facilities than C, Java vs C is still far from Basic vs ASM...), so it's obvious that a big part of the problem is people being used to other ways of thinking.
Yeah, I noticed that several of the people who successfully learned ASM only had like 2 months of TI-BASIC experience and nothing else. It seemed like once they mastered TI-BASIC and got used to how it works, then it was over.
Title: Help a Scrub
Post by: xMarminq_ on November 03, 2016, 02:36:31 am
PROGRESS WITH CODING (BASIC)
--0-9 Guessing Game--
Code:
:Prompt A
:If  A=1
:Stop
:If  A=2
:Stop
:If  A=3
:Stop
:If  A=4
:Stop
:If  A=5
:Stop
:If  A=6
:Stop
:If  A=7
:Stop
:If  A=8
:Stop
:If  A=9
:Stop
:If  A=0
:Prompt B
:If B=

(All I got to, cuz that one one problem

--Password System--
Code:
:Prompt K
:If K=42
:Then
:A=42
:Else
:End
:If K=42
:Then
:Output(2,2,"ACCESS GRANTED"

Help with clearing screen, pls?

This one may be expandable as a system to have code stored in it, and have these passwords be the doors to the code. If I wanted to, I may add a feature where you can add or create an account.


Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: p2 on November 03, 2016, 08:40:16 am
if Possible, just the [code] ... [/code] tags to surround your code. That'll make it easier for us :)

About your code:
If <condition>
Then
<action 1>
Else
<action 2>
End

if you don't have an action2 then you don't need the Else, too.
The ELSE isn'd obligatory, you only use it if you want to define an action if the condition above is NOT met :)
Just change it to this:
If <condition>
Then
<action 1>
End


For your first code:
It seems you want to define a special action (returning some text) in one case and stop the program in all other cases.
That'd be the perfect plase to use ELSE:
If <correct number>
Then
<display stuff>
Else
<Stop the program>
End


for clearing the homescree you use ClrHome :)
PRGM --> I/O --> 8:ClrHome
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: E37 on November 03, 2016, 07:41:48 pm
For your password code...
You have A=42 on its own like.
Are you trying to set A to 42?
To make a letter var equal to a number, use the sto key.
That would be 42->A
Maybe you already know that. Just making sure.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 08:04:32 pm
this thread is funny as f***
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: DJ Omnimaga on November 03, 2016, 08:13:00 pm
Quote from: kotu on November 03, 2016, 08:04:32 pm
this thread is funny as f***
What's funny about it? ???
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 08:17:17 pm
mainly the stuff which would be replaced by a switch in C/C++
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: E37 on November 03, 2016, 08:30:19 pm
Quote from: kotu on November 03, 2016, 08:17:17 pm
mainly the stuff which would be replaced by a switch in C/C++

;) Or by a LUT in asm...
It is hard to compare basic to a pc language. On the pc you have so much processing power, you can afford to write crappy code. You actually have to optimize in basic.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 08:33:40 pm
@xMarminq_ i like what you are doing so far well done

keep going  :)
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 09:58:36 pm
How about sprites?
If so, can I do it directly from it, since I do it all there?
First, I have to learn Getkey...
I feel that if I ask all of you too much, it will be your project instead of mine  :P

How about making a menu?
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 10:02:37 pm
i don't know anything about TI_BASIC i use C on calc

someone else will help you.

have fun :)
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 10:04:27 pm
How do you code in C?
And make a menu like yours?

If i continue in BASIC, will I end up with something like Age of Darkness?
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: DJ Omnimaga on November 03, 2016, 10:06:39 pm
If you use TI-BASIC then start with text graphics and learn the basics first. Then you can worry about graphics later. To display text use Output() or Text().
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 10:06:52 pm
it starts here.............

https://codewalr.us/index.php?topic=1050.75 (https://codewalr.us/index.php?topic=1050.75)
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 10:09:33 pm
Can you make app programs on the CE anyways?

I kinda want to make:
Application (So its protected from edits)
-Has a login system, if possible, maybe multiple accounts.
-Have something like the Doors interface on the 84 plus, storing all your programs on the account (doesn't show up on prgm tab).
-Able to transfer those programs protected or not to other people, not to other account on that calculator.
-Coding language options, if possible.
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 10:10:49 pm
you can make apps programs or games

anything you want
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 10:13:12 pm
good.......  >:D
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 10:24:00 pm
Quote from: xMarminq_ on November 03, 2016, 10:09:33 pm
-Has a login system, if possible, maybe multiple accounts.

you dont really have that on the calculator



Quote from: xMarminq_ on November 03, 2016, 10:09:33 pm
-Have something like the Doors interface on the 84 plus, storing all your programs on the account (doesn't show up on prgm tab).

i use cesium

Quote from: xMarminq_ on November 03, 2016, 10:09:33 pm
-Coding language options, if possible.

i don't know what this means
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 10:28:04 pm
I sorta coded one, the first code update I posted, with the whole password thing. (login System)
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: kotu on November 03, 2016, 10:30:24 pm
what does it log you into?
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: xMarminq_ on November 03, 2016, 10:30:51 pm
Quote from: kotu on November 03, 2016, 10:24:00 pm
Quote from: xMarminq_ on November 03, 2016, 10:09:33 pm

Quote from: xMarminq_ on November 03, 2016, 10:09:33 pm
-Have something like the Doors interface on the 84 plus, storing all your programs on the account (doesn't show up on prgm tab).

i use cesium



On the calculater?

Nothing yet
Title: Re: How to start programming ASM or BASIC for scrubs like me who don't know anything
Post by: p2 on November 04, 2016, 11:12:33 am
As you seem to be new to programming in general: Learn TI BASIC :)
Sure, the language sucks and it's slow and stuff ^^
But it'll teach ou the basics you can later use in many other projects :)

For graphic games you might have to use something like "Axe" lateron, but I realy recommend lerning basic first as it'll be much harder to learn if you dont understand BASIC :)
And it's absolutely normal to have that feeling like "you do half of the coding, is this een still MY project??", you're new to this afterall ;)
Try to complete  couple of projects with the help of the community like this one. And when you feel ready for it, try one on your own :)
And if you have any problems, feel free to ask at any time ^^