Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
-->
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
ASM
»
The missing code!
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: The missing code! (Read 4201 times)
0 Members and 1 Guest are viewing this topic.
systwo
LV2
Member (Next: 40)
Posts: 25
Rating: +7/-0
The missing code!
«
on:
January 13, 2012, 12:30:21 am »
Hi everyone! I have been messing around with BASIC for a bit, but I found it too slow to do some of the fun things on the calculator. That was before I found out about assembly. I have very specific questions for the community here, hopefully you guys can answer it.
Lurking on these forums for a while I discovered that asm was possible to program on the calculator itself - which is something I was looking for, as I do not have a USB link cable. Seeing there are people on this forum who program in hex, I have this question for you:
I noticed that this piece of code is present in every asm program I have seen:
Code:
[Select]
.org 9D95h
As I understand it, this tells the calculator to place the program in this location in ram. Is this for the assembler or the calculator (or both?)? The hex programs that I saw have no reference to this as far as I can discover (on this forum and some others as well). Is there some mystery behind this? Because of this, I have yet to actually program on the calculator.
Also I have also looked into the process of programming and I do know it is safer to program on an emulator first before typing it onto the calculator. Is there a method to convert the program into hex? Preferably not the IRC bot thingy that was posted a while ago (I do not have access to the IRC sometimes)
Many thanks for those who answer this question!
Systwo
Logged
calc84maniac
eZ80 Guru
Coder Of Tomorrow
LV11
Super Veteran (Next: 3000)
Posts: 2912
Rating: +471/-17
Re: The missing code!
«
Reply #1 on:
January 13, 2012, 12:44:17 am »
It is for the assembler. The calculator *always* loads programs at that position in RAM, so that statement tells the assembler what addresses it needs to use for labels and such.
Logged
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman
Deep Toaster
So much to do, so much time, so little motivation
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 8217
Rating: +758/-15
Re: The missing code!
«
Reply #2 on:
January 13, 2012, 12:49:53 am »
It gives the assembler a reference point for addresses, so by counting bytes from that .org statement it will know what numerical value to use for things like $ (current pointer) and labels.
EDIT:
Five-minute ninja.
«
Last Edit: January 13, 2012, 12:50:26 am by Deep Thought
»
Logged
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4705
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: The missing code!
«
Reply #3 on:
January 13, 2012, 11:23:57 am »
! I like to program in hex for my calcy
If you would like some help, I can assist and if you want a chart for converting mnemonics to hex you can try
this
. The main difficulty with programming in hex on the calc is computing addresses. If you forget to count a byte, you could crsah your calc, so you have to be careful.
Also, if you are new to assembly, that chart also has info on the right about the instructions and what they do. It is BASICised a bit, so some of it should be rather easy to get
I hope I can help!
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
chickendude
LV8
Addict (Next: 1000)
Posts: 817
Rating: +90/-1
Pro-Riot Squad
Re: The missing code!
«
Reply #4 on:
January 13, 2012, 11:27:26 am »
And to answer your other question, an asm program is first compiled to its hex statements. Later it is compressed into it's "one-byte" values (like the AsmComp( oncalc command). But if you want to program on a computer, you can, and just copy the hex values. But it'd be much easier (and safer) to send it. There are also programs you can send to your calc to program in actual assembly, if ever get the chance to borrow a USB cable.
«
Last Edit: January 13, 2012, 11:32:37 am by chickendude
»
Logged
systwo
LV2
Member (Next: 40)
Posts: 25
Rating: +7/-0
Re: The missing code!
«
Reply #5 on:
January 13, 2012, 07:41:59 pm »
Ah, that clears up the mystery! Thank you to everyone!
Logged
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4705
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: The missing code!
«
Reply #6 on:
January 13, 2012, 07:45:12 pm »
If you have any other questions, feel free to ask us! There are lots of experienced coders here that can help out
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
ASM
»
The missing code!
\n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t
%body%<' + '/textarea>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Max characters: 20000; characters remaining:
...<' + '/span><' + '/span>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '
', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '
%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject% (Read 4201 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "
Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 85, iCurBoardChildLevel: 1, sCurBoardName: "ASM", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 85, iTopicId: 14851, sSessionId: "20067e070423c4ea9eaf9c6c7e4f5709", sSessionVar: "d4ae1ac45", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } function tick2() { if (typeof(document.forms.quickModForm) != "undefined") { calcCharLeft2(); setTimeout("tick2()", 1000); } else setTimeout("tick2()", 800); } function message_onkeyup() { if (typeof(document.forms.quickModForm) != "undefined" && typeof(document.forms.quickModForm.message) != "undefined") { document.forms.quickModForm.message.onkeyup = function onkeyup(event) { storeCaret(this); calcCharLeft2(); }; } else setTimeout("message_onkeyup()", 800); } message_onkeyup(); function calcCharLeft2() { var maxLength = 20000; var oldEditor = "", currentEditor = document.forms.quickModForm.message.value; if (!document.getElementById("editorLeft2")) return; if (oldEditor != currentEditor) { oldEditor = currentEditor; if (currentEditor.replace(/\r/, "").length > maxLength) document.forms.quickModForm.message.value = currentEditor.replace(/\r/, "").substring(0, maxLength); currentEditor = document.forms.quickModForm.message.value.replace(/\r/, ""); } setInnerHTML(document.getElementById("editorLeft2"), maxLength - currentEditor.length); } // ]]>-->