Subject: Assembly question

From: Owen Brand <[email-masked]>
Date: Tue, 17 Nov 2009 18:58:33 -0500

Hey guys... I'm going through the Molesworth book page by page.  I  
just have one quick question before I go any further....  I am really  
new to this whole system, so bear with me...  Just as a clarification,  
in the book, he gives several example math questions in hex, but no  
answers.  Just to be sure, so I know I'm on the right track,

 >6800 is equivalent to 26624
 >029A is equivalent to 666

 >6800+>029A=27290

Is this correct, or am I fishing in the dark?

Owen Brand
**Oprysoft**
Opry99er.com

---

From: Barry Boone <[email-masked]>
Date: Tue, 17 Nov 2009 19:00:24 -0500

Correct

From: [email-masked] [mailto:[email-masked]] On Behalf Of Owen Brand
Sent: Tuesday, November 17, 2009 5:59 PM
To: [email-masked]
Subject: [TI994A] Assembly question

Owen Brand
**Oprysoft**
Opry99er.com

---

From: "Jon Vogel" <[email-masked]>
Date: Tue, 17 Nov 2009 18:46:55 -0600

You might want to get a programmer's calculator for your iPhone.

Regards,

Jon

From: "Owen Brand" <[email-masked]>

---

From: Owen Brand <[email-masked]>
Date: Tue, 17 Nov 2009 20:04:56 -0500

Sh**...  Didn't even know there was an app for that.  :). I'll have to  
get on that asap.  This book is fascinating.  Really helps make sense  
of all the >xxxx talk I have seen from some of you... How the CPU is  
mapped out and how the scratchpad works... I am digging in now.  This  
is a pretty elementary instructional book, but you have to crawl  
before you can walk.

Owen Brand
**Oprysoft**
Opry99er.com

---

From: fdos <[email-masked]>
Date: Tue, 17 Nov 2009 18:21:25 -0700

Owen,

If you don't find the app for your iPod that does Hex/Decimal 
conversions there are cheap $10 to $12 calculators at Wal*Mart that do 
Hex/Dec/Bin/Oct conversions.  Handy to have around when you're not 
coding in Forth :-)

Bill S

---

From: "Tursi" <[email-masked]>
Date: Tue, 17 Nov 2009 20:46:54 -0500

>> You might want to get a programmer's calculator for your iPhone.

The Windows7 Calculator has a really sweet programmer's mode... much nicer 
than the old Calc! :)

---

From: Jon Vogel <[email-masked]>
Date: Tue, 17 Nov 2009 20:08:00 -0600

Pcalc will do the job for 99 cents.  Search the app store.

Regards,

Jon

On Nov 17, 2009, at 7:04 PM, Owen Brand <[email-masked]> wrote:

>
>
> Sh**...  Didn't even know there was an app for that.  :). I'll have  
> to get on that asap.  This book is fascinating.  Really helps make  
> sense of all the >xxxx talk I have seen from some of you... How the  
> CPU is mapped out and how the scratchpad works... I am digging in  
> now.  This is a pretty elementary instructional book, but you have  
> to crawl before you can walk.
>
> Owen Brand
> **Oprysoft**
> Opry99er.com
>

---

From: mark wills <[email-masked]>
Date: Tue, 17 Nov 2009 20:26:05 -0800 (PST)

Correct.

I don't know what others think, but I think it's common for newbies to want to convert HEX Numbers to decimal to do the math, then back to hex. Of course, base 10 is most natural for us.

After a while though, you get more comfortable with doing hex in your head. 

>
>From: Barry Boone <[email-masked]>
>To: "[email-masked]" <[email-masked]>
>Sent: Wed, 18 November, 2009 1:00:24
>Subject: RE: [TI994A] Assembly question
>
> >
>
>
>
>
>  >
>>      
> 
>>
>
>
>
>
>>
>Correct
> 
>>
>>
>From:>TI994A@yahoogroups. com [mailto:TI994A@ yahoogroups. com] On Behalf Of Owen
>Brand
>To: TI994A@yahoogroups. com

---

From: mark wills <[email-masked]>
Date: Tue, 17 Nov 2009 20:28:41 -0800 (PST)

Windows has one too!

Just press the windows key and R, type CALC and hit enter! Hey presto! Select scientific mode and you're off.

----- Original Message ----
> From: fdos <[email-masked]>
> Sent: Wed, 18 November, 2009 2:21:25
> Subject: Re: [TI994A] Assembly question
> 
> Owen,
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
>

---

From: Barry Boone <[email-masked]>
Date: Tue, 17 Nov 2009 23:34:08 -0500

Windows 7 actually has a programmer mode on its calc

From: [email-masked] [mailto:[email-masked]] On Behalf Of mark wills
Sent: Tuesday, November 17, 2009 10:29 PM
To: [email-masked]
Subject: Re: [TI994A] Assembly question

Windows has one too!

----- Original Message ----
> From: fdos <[email-masked]<mailto:fdosbrs%40frontiernet.net>>
> To: [email-masked]<mailto:TI994A%40yahoogroups.com>

---

From: ti99_forever <[email-masked]>
Date: Tue, 17 Nov 2009 21:19:09 -0800 (PST)

Yep, they copied OS X...
(ducks, runs for cover...)

--- On Tue, 11/17/09, Barry Boone <[email-masked]> wrote:

From: Barry Boone <[email-masked]>
Subject: RE: [TI994A] Assembly question
To: "[email-masked]" <[email-masked]>
Date: Tuesday, November 17, 2009, 11:34 PM

  

      

From:
TI994A@yahoogroups. com [mailto:TI994A@ yahoogroups. com] On Behalf Of mark
wills

   

Windows has one too!

Just press the windows key and R, type CALC and hit enter! Hey presto! Select
scientific mode and you're off.

----- Original Message ----

> From: fdos <fdosbrs@frontiernet .net>

> Hex/Dec/Bin/ Oct conversions. Handy to have around when you're not 

> ------------ --------- --------- ------

---

From: Barry Boone <[email-masked]>
Date: Wed, 18 Nov 2009 01:09:23 -0500

Considering my favorite OS is FreeBSD, I’m sure not gonna complain :)

From: [email-masked] [mailto:[email-masked]] On Behalf Of ti99_forever
Sent: Tuesday, November 17, 2009 11:19 PM
To: [email-masked]
Subject: RE: [TI994A] Assembly question

Yep, they copied OS X...

From: TI994A@yahoogroups. com [mailto:TI994A@ yahoogroups. com] On Behalf Of mark wills
Sent: Tuesday, November 17, 2009 10:29 PM
To: TI994A@yahoogroups. com
Subject: Re: [TI994A] Assembly question

Windows has one too!

----- Original Message ----
> From: fdos <fdosbrs@frontiernet .net</mc/compose?to=fdosbrs%40frontiernet.net>>
> To: TI994A@yahoogroups. com</mc/compose?to=TI994A%40yahoogroups.com>

---

From: "Matthew" <[email-masked]>
Date: Wed, 18 Nov 2009 16:02:48 -0000

--- In [email-masked], Barry Boone <boone@...> wrote:
>
> Considering my favorite OS is FreeBSD, I'm sure not gonna complain :)

Rock on!  I've Been using FreeBSD since 1.01. :-)

> > > Is this correct, or am I fishing in the dark?

Owen, don't get too hung up on trying to do hex math in your head.  What you really need to understand is to recognize when you are looking at numbers in hex vs. decimal, and sometimes even octal.  If you are running Windows XP or 7, or OSX, then the built in calculator is your friend.

The other important thing to understand about hex is its relationship to binary (base 2).  From the wikipedia:

"Its primary use is as a human-friendly representation of binary coded values, so it is often used in digital electronics and computer engineering. Since each hexadecimal digit represents four binary digits (bits) — also called a nibble — it is a compact and easily translated shorthand to express values in base two."

The TI is really cool because of the way character definitions are defined using hex values, even in BASIC!!  It is an awesome learning tool because you can directly see how hex is used to represent binary and get visual feedback in the form of computer graphics.

I don't know if you understand the hex to binary relationship yet, but if not, let me know and I'll try to explain it.

As for assembly language and assemblers, decimal values are *usually* the default and hex values will have some sort of delimiter to indicate a base-16 number.  The TI assembler uses the greater-then symbol to indicate a hex number, so that's what all those numbers like >1234 and >8C00 are that you see.  The GNU assembler uses $ I think, and % for registers, which makes it very hard to read IMHO.  x86 assembly uses a trailing "h" and a leading "0" if the hex number starts with a letter (to distinguish it from a label): 0ABCDh or 8C00h.  In C you will see hex values with a "0x" prefix: 0x8C00.

Anyway, I hope this helps a little.

Matthew