You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1144 lines
84 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>
ARM Assembler Programming PPC FAQ [PocketMatrix >> mobile devices]</title>
<link href="./../styles/pocketmatrix-default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table id="header" cellspacing="0">
<tr>
<td id="logo"><img src="./../images/logo.gif" width="227" height="43" /></td>
<td id="watermark" valign="center" align="right" style="color:#CCCCCC; font-size: 9px">
<form method="post" action="http://www.ymlp.com/subscribe.php?pocketmatrix">
Register for our Newsletter <strong>&gt;&gt;</strong> You heard it here first.<br />
<input type="text" name="YMLP0" size="20">
<input type="submit" value="Submit">
</form>
</td>
</tr>
</table>
<table id="linkbar" cellspacing="0">
<tr>
<td>&nbsp;<a href="./../">home</a> . <a href="./../forums/index.php">forums</a> . <a href="./../developers/index.php">developers</a> . <a href="./../reviews/index.php">reviews</a> . <a href="./../multimedia/index.php">multimedia</a> . <a href="./../guides/index.php">guides</a> . <a href="./../stores/index.php">stores</a></td>
<td align="right"><a href="./../about/index.php">about</a> . <a href="./../contact/index.php">contact</a> . <a href="./../advertise/index.php">advertise</a> &nbsp; </td>
</tr>
</table>
<table id="sublinkbar" cellspacing="0">
<tr>
<td align="left" width="50"><a href="./../../stores/"><img src="./../../images/stores.gif" /></a></td>
<td align="left" nowrap="nowrap" style="color:#333333">
( Hardware: <strong><a href="./../phpAdsNew/adclick.php?bannerid=38&zoneid=&source=&dest=http%3A%2F%2Fwww.gbtmobile.com%2F%3Fcoid%3D54">GBT Mobile</a></strong>
. <strong><a href="./../phpAdsNew/adclick.php?bannerid=20&source=topbar&dest=http%3A%2F%2Fwww.proportable.com%2F">PROPortable</a></strong>
| Software: <strong><a href="./../phpAdsNew/adclick.php?bannerid=3&amp;source=topbar&amp;dest=http%3A%2F%2Fwww.pdamill.com%2Fpm.shtml">PDAmill Games</a></strong>
. <strong><a href="./../phpAdsNew/adclick.php?bannerid=14&source=topbar&dest=http%3A//www.handango.com/ampp/store/home.jsp?siteId=812">Handango</a></strong>)
</td>
<td align="left" width="20"><img src="./../../images/top-left-arrows.gif" width="28" height="20" /></td>
<td align="right" nowrap="nowrap" width="80%">
<a href="./privmsg.php?folder=inbox">You have no new messages</a> |
<a href="./login.php">Log in</a> &nbsp;
</td>
</tr>
</table>
<table id="layouttable" cellspacing="0">
<tr>
<td class="sidepanel"></td>
<td id="centerpanel"> <table class="intro">
<tr>
<td><img src="./../images/arrow-widget.gif" width="60" height="50" /></td>
<td><p>
Welcome to PocketMatrix.com, a Mobile Devices enthusiast website. If you're a developer, be sure to check out our <a href='/forums/index.php?c=2'>developer forums</a>. <br>You can change your sidebar preferences in your <a href='/forums/profile.php?mode=editprofile'>Profile</a>. </p></td>
</tr>
</table>
<div style="background-color: #B9C5CE; border: 1px solid #9FADC4; padding: 2px; text-align:center; margin-top: 5px; margin-bottom: 5px;" align="center">
<span class="mainmenu">&nbsp;<a href="index.php">Home</a> | <a href="faq.php">FAQ</a> | <a href="search.php">Search</a> | <a href="memberlist.php">Memberlist</a> | <a href="groupcp.php">Usergroups</a> | <a href="profile.php?mode=editprofile">Profile</a> | <a href="privmsg.php?folder=inbox">Log in to check your private messages</a> | <a href="login.php">Log in</a>
| <a href="profile.php?mode=register">Register</a>&nbsp;</span>
</div>
<div class="seperator"></div>
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="bottom" colspan="2"><a href="viewforum.php?f=5" style="font-size:9pt">General Developer Discussion</a><br />
<span style="font-size: 8pt"><strong><a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;highlight="> ARM Assembler Programming PPC FAQ</a></strong><br />
</a></span>
<br />
</td>
</tr>
</table>
<table width="100%" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td align="left" valign="bottom" nowrap="nowrap">Page <b>1</b> of <b>3</b> | <b>Goto page <b>1</b>, <a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=15">2</a>, <a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=30">3</a>&nbsp;&nbsp;<a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=15">Next</a></b></td>
<td align="right" valign="middle" width="100%"><strong>[ <a href="posting.php?mode=newtopic&amp;f=5">Post new topic</a> ]</> [ <a href="posting.php?mode=reply&amp;t=4063">Reply</a> ]
</strong></td>
</tr>
</table>
<table width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59939"></a><a href="viewtopic.php?p=59939#59939"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 11:04 am | Post subject: ARM Assembler Programming PPC FAQ</></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>Wrecked</strong><br />
Guest<br />
<br />
<br />
<small><br />
<br />
<br /></small>
<br />
<br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Can anyone give me any information an writing assembler for arm using VC++ embedded tools.
<br />
<br />
An example would make all my dreams come true<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59939"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59943"></a><a href="viewtopic.php?p=59943#59943"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 11:29 am | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>simonjacobs</strong><br />
pm Insider<br />
<img src="images/avatars/gallery/Simpsons/mrburns.gif" alt="" border="0" /><br />
<br />
<small>Joined: 27 Nov 2001<br />
Posts: 322<br />
Location: London, UK<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=474"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=474"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://www.xengames.com/" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
This is a FAQ for ARM assembler programming on the Pocket PC.
<br />
<br />
Maintained by Simon Jacobs
<br />
<br />
Version 1.0 (22'nd Jan 2002)
<br />
<br />
I have done my best to make this accurate and useful, but I make no guarantees. Remember that assembler programming is complex and if you are unsure of yourself you should ask for help. Please email me if there are any questions you would like to see added to the list.
<br />
<br />
<br />
--------------------------------------------------------------------------------
<br />
<br />
1) Is there a good book about ARM assembler?
<br />
2) Can I use inline assembler in my c code with Embedded Visual C++?
<br />
3) Can I see what assembler code the c compiler creates?
<br />
4) How do I add an assembley source file to my project, and get EVC to assemble it?
<br />
5) How do I write a function in assembler and call it from the c code?
<br />
6) How are values passed to and from the assembler function?
<br />
7) Can I use any of the 16 registers for anything?
<br />
8) Useful resources.
<br />
<br />
<br />
--------------------------------------------------------------------------------
<br />
<br />
1) Is there a good book about ARM assembler.
<br />
<br />
ARM System-on-chip architecture (second edition)
<br />
Steve Furber
<br />
Addison-Wesley
<br />
<br />
As well as some chapters aimed more at hardware designers, it has an explanation of the ARM instruction set plus a complete reference of the assembler format for each one. It doesnt teach programming in any way, but if you are experienced in c programming and just need full details of the instruction set and info on how the processor works it is great.
<br />
<br />
2) Can I use inline assembler in my c code with Embedded Visual C++?
<br />
<br />
There is no supported way of doing this. You need to put your assembler in seperate functions which can be called from your c code. See below for details of how to do this.
<br />
<br />
3) Can I see what assembler code the c compiler creates?
<br />
<br />
Yes, and this is very useful for a few reasons. You can see how optimal the code being produced is, and also learn how the compiler does things. You need to:
<br />
<br />
From the 'Project' menu choose 'Settings'. Go to the 'C/C++' tab. In the 'Category' drop-down-list choose 'Listing Files'. In the 'Listing file type' drop-down-list choose 'Assembley with Source Code'.
<br />
<br />
Now the compiler will produce .asm files in the output directory which contain the assembler code with the c source as comments.
<br />
<br />
4) How do I add an assembley source file to my project, and get EVC to assemble it?
<br />
<br />
Create a blank file 'myfile.asm' in your project directory with notepad. From the menu in EVC select 'Project->Add to Project->Files' set the 'Files of type' field to 'All Files' and select the myfile.asm file. It will appear in the file list on the left, drag it into the 'Source Files' section.
<br />
<br />
Select 'Project->Settings' from the menu. On the left of the dialog: select the 'ARM release' configuration and select the 'myfile.asm' file. On the right of the dialog: select the 'Custom Build' tab. In the 'Commands' box add the text 'armasm myfile.asm' and in the 'Outputs' box add the text 'myfile.obj'. Repeat this for the 'ARM debug' configuration.
<br />
<br />
Now you can open and edit myfile.asm from EVC and it will be assembled into your project.
<br />
<br />
5) How do I write a function in assembler and call it from the c code?
<br />
<br />
First a note about the assembler source code layout. All command lines should begin with a tab. Any lines that have text on the left are labels. You need to use labels for function names and as targets for branch instructions. Use a semicolon to mark the rest of a line as a comment. The file should finish with an END command.
<br />
<br />
Example file:
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br>2&nbsp;<br>3&nbsp;<br>4&nbsp;<br>5&nbsp;<br>6&nbsp;<br>7&nbsp;<br>8&nbsp;<br>9&nbsp;<br>10&nbsp;<br>11&nbsp;<br>12&nbsp;<br>13&nbsp;<br>14&nbsp;<br>15&nbsp;<br>16&nbsp;<br>17&nbsp;<br>18&nbsp;<br>19&nbsp;<br>20&nbsp;<br>21&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'>&nbsp;&nbsp;&nbsp;&nbsp;AREA&nbsp;ArmGfxLib<span style='color:red;display:inline'>,</span>CODE<span style='color:red;display:inline'>,</span>READONLY<br>&nbsp;&nbsp;&nbsp;&nbsp;EXPORT&nbsp;FunctionA<br>&nbsp;&nbsp;&nbsp;&nbsp;EXPORT&nbsp;FunctionB<br><br>FunctionA<br>&nbsp;&nbsp;&nbsp;&nbsp;MOV&nbsp;r12<span style='color:red;display:inline'>,</span>&nbsp;sp<br>&nbsp;&nbsp;&nbsp;&nbsp;stmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>lr<span style='color:red;display:inline'>}</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;useful&nbsp;code&nbsp;to&nbsp;<span style='color:blue;display:inline'>do</span>&nbsp;something&nbsp;goes&nbsp;here<span style='color:red;display:inline'>!</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;ldmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>pc<span style='color:red;display:inline'>}</span><br><br>FunctionB<br>&nbsp;&nbsp;&nbsp;&nbsp;MOV&nbsp;r12<span style='color:red;display:inline'>,</span>&nbsp;sp<br>&nbsp;&nbsp;&nbsp;&nbsp;stmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>lr<span style='color:red;display:inline'>}</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;useful&nbsp;code&nbsp;to&nbsp;<span style='color:blue;display:inline'>do</span>&nbsp;something&nbsp;goes&nbsp;here<span style='color:red;display:inline'>!</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;ldmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>pc<span style='color:red;display:inline'>}</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;END<br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>21</b> lines; <b>2</b> keywds; <b>0</b> nums; <b>32</b> ops; <b>0</b> strs; <b>0</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
Explanation: the AREA command gives a name to this code section. The EXPORT command makes those labels available as functions. The stmfd/ldmfd commands save and restore the registers to the stack, so you dont corrupt values that the calling function depends on.
<br />
<br />
In your c++ code add the line:
<br />
<br />
#ifdef ARM
<br />
extern "C" void FunctionA(int a, int b);
<br />
#endif
<br />
<br />
The #ifdef is because we have written the function in ARM assembler so it isnt available in MIPS/SH3 builds.
<br />
<br />
6) How are values passed to and from the assembler function?
<br />
<br />
If you declare a function of the form:
<br />
<br />
extern "C" int armfunction(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6);
<br />
<br />
The first 4 arguments will be passed in the registers r0-r3. These registers will contain the passed values at the start of your assembler function. Further arguments are passed on the stack, see the code below to read them.
<br />
<br />
The return value should be placed into register r0 at the end of your assembler function (just before you return to the caller).
<br />
<br />
This works well with int's and pointers (all pointers are 32 bits). If you try and pass a structure directly as an argument it gets more complex. I advise you to only pass/return integers and pointers to/from your assembler functions, at least to start with.
<br />
<br />
Here is an example function (declared as above) which adds its six arguments and returns the result.
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br>2&nbsp;<br>3&nbsp;<br>4&nbsp;<br>5&nbsp;<br>6&nbsp;<br>7&nbsp;<br>8&nbsp;<br>9&nbsp;<br>10&nbsp;<br>11&nbsp;<br>12&nbsp;<br>13&nbsp;<br>14&nbsp;<br>15&nbsp;<br>16&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'>armfunction<br>&nbsp;&nbsp;&nbsp;&nbsp;MOV&nbsp;r12<span style='color:red;display:inline'>,</span>&nbsp;sp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;these&nbsp;two&nbsp;lines&nbsp;are<br>&nbsp;&nbsp;&nbsp;&nbsp;stmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>lr<span style='color:red;display:inline'>}</span>&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;standard&nbsp;setup&nbsp;code<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0<span style='color:red;display:inline'>-</span>r3&nbsp;are&nbsp;the&nbsp;first&nbsp;<span style='color:purple;display:inline'>4</span>&nbsp;arguments&nbsp;passed<br><br>&nbsp;&nbsp;&nbsp;&nbsp;ldr&nbsp;r4<span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>[</span>r12<span style='color:red;display:inline'>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;load&nbsp;<span style='color:purple;display:inline'>5</span>'th&nbsp;argument&nbsp;into&nbsp;r4<br>&nbsp;&nbsp;&nbsp;&nbsp;ldr&nbsp;r5<span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>[</span>r12<span style='color:red;display:inline'>,</span>&nbsp;#4<span style='color:red;display:inline'>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;load&nbsp;<span style='color:purple;display:inline'>6</span>'th&nbsp;argument&nbsp;into&nbsp;r5<br><br>&nbsp;&nbsp;&nbsp;&nbsp;add&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r1&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>+</span>&nbsp;r1<br>&nbsp;&nbsp;&nbsp;&nbsp;add&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r2&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>+</span>&nbsp;r2<br>&nbsp;&nbsp;&nbsp;&nbsp;add&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r3&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>+</span>&nbsp;r3<br>&nbsp;&nbsp;&nbsp;&nbsp;add&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r4&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>+</span>&nbsp;r4<br>&nbsp;&nbsp;&nbsp;&nbsp;add&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r0<span style='color:red;display:inline'>,</span>&nbsp;r5&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;r0&nbsp;<span style='color:red;display:inline'>+</span>&nbsp;r5<br><br>&nbsp;&nbsp;&nbsp;&nbsp;ldmfd&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r4<span style='color:red;display:inline'>-</span>r11<span style='color:red;display:inline'>,</span>pc<span style='color:red;display:inline'>}</span>&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;standard&nbsp;cleanup&nbsp;and&nbsp;<span style='color:blue;display:inline'>return</span>&nbsp;code<br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>16</b> lines; <b>1</b> keywds; <b>3</b> nums; <b>52</b> ops; <b>0</b> strs; <b>0</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
7) Can I use any of the 16 registers for anything?
<br />
<br />
No. You can use r0-r12 and r14 for anything you like. r15 is the program counter, if you write a value to it then execution will jump to that location. Use the branch instruction, dont alter it directly. r13 is the stack pointer, do not alter it unless you are sure you know what you are doing. r14 (which you can use) is the link register. If you want to call another function you need to set this to the return address, I will include an example in a future version of this FAQ.
<br />
<br />
8) Useful resources.
<br />
<ul>
<br />
<li><a href="http://www.ukscene.org/sulph/">sulphur's gba development site</a>
<br />
<li><a href="http://www.intel.com/design/strong/manuals/">Intel StrongARM Manuals</a>
<br />
<li><a href="http://www.geocities.com/wonglinhoo/Arm.htm">The Arm Microprocessor</a>
<br />
<li><a href="http://www.soup-kitchen.net/armcode/">Soup Kitchen - Arm Tutorial</a>
<br />
<li><a href="http://www.heyrick.co.uk/assembler/">ARM Assembler Programming</a>
<br />
<li><a href="http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/">ARM Assembly Lecture Notes</a>
<br />
<li><a href="http://wheelie.tees.ac.uk/users/a.clements/ARMinfo/ARMnote.htm">The ARM Processor</a>
<br />
<li><a href="http://re-eject.gbadev.org/">ARM Quick-Instruction reference sheet</a>
<br />
<li><a href="http://www.gbadev.org/">gameboy advance development</a>
<br />
</ul><br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59943"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59944"></a><a href="viewtopic.php?p=59944#59944"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 11:40 am | Post subject: thanks</></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>wrecked</strong><br />
Guest<br />
<br />
<br />
<small><br />
<br />
<br /></small>
<br />
<br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Thats great mate..
<br />
Im now in ecstasy
<br />
<br />
cheers!!!!!!!<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59944"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59945"></a><a href="viewtopic.php?p=59945#59945"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 11:43 am | Post subject: address</></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>wrecked</strong><br />
Guest<br />
<br />
<br />
<small><br />
<br />
<br /></small>
<br />
<br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
What is the url for soup kitchen and other stuff<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59945"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59946"></a><a href="viewtopic.php?p=59946#59946"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 11:44 am | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>simonjacobs</strong><br />
pm Insider<br />
<img src="images/avatars/gallery/Simpsons/mrburns.gif" alt="" border="0" /><br />
<br />
<small>Joined: 27 Nov 2001<br />
Posts: 322<br />
Location: London, UK<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=474"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=474"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://www.xengames.com/" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
<span style="font-weight: bold">8) Useful resources.</span>
<br />
<ul>
<br />
<li><a href="http://www.ukscene.org/sulph/">sulphur's gba development site</a>
<br />
<li><a href="http://www.intel.com/design/strong/manuals/">Intel StrongARM Manuals</a>
<br />
<li><a href="http://www.geocities.com/wonglinhoo/Arm.htm">The Arm Microprocessor</a>
<br />
<li><a href="http://www.soup-kitchen.net/armcode/">Soup Kitchen - Arm Tutorial</a>
<br />
<li><a href="http://www.heyrick.co.uk/assembler/">ARM Assembler Programming</a>
<br />
<li><a href="http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/">ARM Assembly Lecture Notes</a>
<br />
<li><a href="http://wheelie.tees.ac.uk/users/a.clements/ARMinfo/ARMnote.htm">The ARM Processor</a>
<br />
<li><a href="http://re-eject.gbadev.org/">ARM Quick-Instruction reference sheet</a>
<br />
<li><a href="http://www.gbadev.org/">gameboy advance development</a>
<br />
</ul><br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59946"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59951"></a><a href="viewtopic.php?p=59951#59951"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 12:10 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>refractor</strong><br />
pm Insider<br />
<img src="images/avatars/711.jpg" alt="" border="0" /><br />
<br />
<small>Joined: 05 Feb 2002<br />
Posts: 2259<br />
Location: Luxembourg<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=711"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=711"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Hiya.
<br />
<br />
Firstly, you can't (easily) embed ARM assembler in EVC++ (which *stinks*).
<br />
<br />
So, you must make external ARM files.
<br />
<br />
For example, take this and save it as "clear_screen.s":
<br />
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br>2&nbsp;<br>3&nbsp;<br>4&nbsp;<br>5&nbsp;<br>6&nbsp;<br>7&nbsp;<br>8&nbsp;<br>9&nbsp;<br>10&nbsp;<br>11&nbsp;<br>12&nbsp;<br>13&nbsp;<br>14&nbsp;<br>15&nbsp;<br>16&nbsp;<br>17&nbsp;<br>18&nbsp;<br>19&nbsp;<br>20&nbsp;<br>21&nbsp;<br>22&nbsp;<br>23&nbsp;<br>24&nbsp;<br>25&nbsp;<br>26&nbsp;<br>27&nbsp;<br>28&nbsp;<br>29&nbsp;<br>30&nbsp;<br>31&nbsp;<br>32&nbsp;<br>33&nbsp;<br>34&nbsp;<br>35&nbsp;<br>36&nbsp;<br>37&nbsp;<br>38&nbsp;<br>39&nbsp;<br>40&nbsp;<br>41&nbsp;<br>42&nbsp;<br>43&nbsp;<br>44&nbsp;<br>45&nbsp;<br>46&nbsp;<br>47&nbsp;<br>48&nbsp;<br>49&nbsp;<br>50&nbsp;<br>51&nbsp;<br>52&nbsp;<br>53&nbsp;<br>54&nbsp;<br>55&nbsp;<br>56&nbsp;<br>57&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'><span style='color:red;display:inline'>;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TITLE<span style='color:red;display:inline'>(</span><span style='color:"#840000";display:inline'>"clear_screen"</span><span style='color:red;display:inline'>)</span><br><span style='color:red;display:inline'>;</span><span style='color:red;display:inline'>+</span><span style='color:red;display:inline'>+</span><br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span>&nbsp;Module&nbsp;Name<span style='color:red;display:inline'>:</span><br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span>&nbsp;&nbsp;&nbsp;&nbsp;clear_screen<span style='color:red;display:inline'>.</span>s<br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span>&nbsp;Abstract<span style='color:red;display:inline'>:</span><br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span>&nbsp; &nbsp;Test&nbsp;procedure&nbsp;to&nbsp;compile&nbsp;and&nbsp;run&nbsp;on&nbsp;my&nbsp;IPAQ<span style='color:red;display:inline'>.</span><span style='color:red;display:inline'>.</span><span style='color:red;display:inline'>.</span>&nbsp;<span style='color:red;display:inline'>(</span>keyword&nbsp;there&nbsp;is&nbsp;test<span style='color:red;display:inline'>)</span><br><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>;</span><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AREA&nbsp;screen_writer<span style='color:red;display:inline'>,</span>&nbsp;CODE<span style='color:red;display:inline'>,</span>&nbsp;READONLY&nbsp;&nbsp;<span style='color:red;display:inline'>;</span>&nbsp;name&nbsp;<span style='color:blue;display:inline'>this</span>&nbsp;block&nbsp;of&nbsp;code<br><br>&nbsp; &nbsp; EXPORT&nbsp; clear_screen_arm<br><br><span style='color:red;display:inline'>;</span>&nbsp;simple<span style='color:red;display:inline'>,</span>&nbsp;unoptimised&nbsp;CLS&nbsp;routine<span style='color:red;display:inline'>,</span>&nbsp;hard<span style='color:red;display:inline'>-</span>coded&nbsp;to&nbsp;a&nbsp;<span style='color:purple;display:inline'>16bpp</span>&nbsp;<span style='color:purple;display:inline'>320x240</span>&nbsp;screen<span style='color:red;display:inline'>.</span><br><br>&nbsp; &nbsp; &nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp; &nbsp;Takes&nbsp;address&nbsp;of&nbsp;screen&nbsp;in&nbsp;R0<br>&nbsp; &nbsp; &nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp; &nbsp;colour&nbsp;in&nbsp;R1<br><br>clear_screen_arm<br>&nbsp; &nbsp; stmfd&nbsp; &nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r0<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>,</span>r14<span style='color:red;display:inline'>}</span><br>&nbsp; &nbsp; &nbsp; &nbsp; add&nbsp;&nbsp; &nbsp; r1<span style='color:red;display:inline'>,</span>r1<span style='color:red;display:inline'>,</span>r1<span style='color:red;display:inline'>,</span>lsl&nbsp;#16&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;colour&nbsp;into&nbsp;both&nbsp;pixels&nbsp;please<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r2<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r3<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r4<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r5<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r6<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r7<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r8<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r9<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r10<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r11<span style='color:red;display:inline'>,</span>r1<br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;&nbsp; &nbsp; r12<span style='color:red;display:inline'>,</span>r1<br><br>&nbsp; &nbsp; &nbsp; &nbsp; mov&nbsp;r14<span style='color:red;display:inline'>,</span>#320<br>clear_screen_arm_inner<br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br>&nbsp; &nbsp; &nbsp; &nbsp; stmia&nbsp; &nbsp;r0<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span><span style='color:red;display:inline'>{</span>r1<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>}</span>&nbsp; &nbsp; <span style='color:red;display:inline'>;</span>&nbsp;store&nbsp;<span style='color:purple;display:inline'>24</span>&nbsp;pixels&nbsp;in&nbsp;one&nbsp;shot<span style='color:red;display:inline'>.</span><br><br>&nbsp; &nbsp; &nbsp; &nbsp; subs&nbsp;&nbsp; &nbsp;r14<span style='color:red;display:inline'>,</span>r14<span style='color:red;display:inline'>,</span>#1<br>&nbsp; &nbsp; &nbsp; &nbsp; bne&nbsp;&nbsp; &nbsp; clear_screen_arm_inner<br><br>&nbsp; &nbsp; ldmfd&nbsp;&nbsp;&nbsp;sp<span style='color:red;display:inline'>!</span><span style='color:red;display:inline'>,</span>&nbsp;<span style='color:red;display:inline'>{</span>r0<span style='color:red;display:inline'>-</span>r12<span style='color:red;display:inline'>,</span>pc<span style='color:red;display:inline'>}</span><br><br>&nbsp; &nbsp; END<br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>57</b> lines; <b>1</b> keywds; <b>12</b> nums; <b>135</b> ops; <b>1</b> strs; <b>0</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
<br />
Now, you need to compile it. With your path set correctly, at a command/dos prompt run:
<br />
<br />
armasm clear_screen.s
<br />
<br />
(you can include a macro to compile your *.s files elsewhere in you project - this has already been discussed somewhere on this board, IIRC).
<br />
<br />
Now, move the clear_screen.obj file to where you want it, and make sure that the directory is in the:
<br />
<br />
Tools -&gt; Options -&gt;Directories -&gt; Library files
<br />
<br />
list.
<br />
<br />
In the C file that calls the function, put (I put it just after the #includes):
<br />
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'><span style='color:blue;display:inline'>extern</span>&nbsp;<span style='color:"#840000";display:inline'>"C"</span>&nbsp;<span style='color:blue;display:inline'>void</span>&nbsp;clear_screen_arm<span style='color:red;display:inline'>(</span>DWORD<span style='color:red;display:inline'>,</span><span style='color:blue;display:inline'>unsigned</span>&nbsp;<span style='color:blue;display:inline'>short</span><span style='color:red;display:inline'>)</span><span style='color:red;display:inline'>;</span><br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>1</b> lines; <b>4</b> keywds; <b>0</b> nums; <b>4</b> ops; <b>1</b> strs; <b>0</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
<br />
... and here's a function that calls it and sets the screen pink (uses GAPI to get the screen location, then munges it for my iPAQ):
<br />
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br>2&nbsp;<br>3&nbsp;<br>4&nbsp;<br>5&nbsp;<br>6&nbsp;<br>7&nbsp;<br>8&nbsp;<br>9&nbsp;<br>10&nbsp;<br>11&nbsp;<br>12&nbsp;<br>13&nbsp;<br>14&nbsp;<br>15&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'><span style='color:blue;display:inline'>bool</span>&nbsp;ClearScreen<span style='color:red;display:inline'>(</span><span style='color:red;display:inline'>)</span><br><span style='color:red;display:inline'>{</span><br>&nbsp; &nbsp; <span style='color:blue;display:inline'>unsigned</span>&nbsp;<span style='color:blue;display:inline'>short</span>&nbsp;<span style='color:red;display:inline'>*</span>&nbsp;pusLine&nbsp;<span style='color:red;display:inline'>=</span>&nbsp;<span style='color:red;display:inline'>(</span><span style='color:blue;display:inline'>unsigned</span>&nbsp;<span style='color:blue;display:inline'>short</span>&nbsp;<span style='color:red;display:inline'>*</span><span style='color:red;display:inline'>)</span>GXBeginDraw<span style='color:red;display:inline'>(</span><span style='color:red;display:inline'>)</span><span style='color:red;display:inline'>;</span><br>&nbsp; &nbsp; <span style='color:blue;display:inline'>if</span>&nbsp;<span style='color:red;display:inline'>(</span>pusLine&nbsp;<span style='color:red;display:inline'>=</span><span style='color:red;display:inline'>=</span>&nbsp;NULL<span style='color:red;display:inline'>)</span>&nbsp;<span style='color:blue;display:inline'>return</span>&nbsp;<span style='color:blue;display:inline'>false</span><span style='color:red;display:inline'>;</span>&nbsp;<span style='color:green;display:inline'>//&nbsp;NOT&nbsp;OK&nbsp;TO&nbsp;DRAW,&nbsp;return&nbsp;failure.</span><br><br>&nbsp; &nbsp; <span style='color:green;display:inline'>//&nbsp;WARNING&nbsp;hard-coded&nbsp;for&nbsp;the&nbsp;purposes&nbsp;of&nbsp;it&nbsp;actually&nbsp;running&nbsp;on&nbsp;my&nbsp;iPAQ&nbsp;3600</span><br>&nbsp; &nbsp; <span style='color:green;display:inline'>//&nbsp;gxbegindraw&nbsp;doesn't&nbsp;give&nbsp;me&nbsp;the&nbsp;first&nbsp;pixel&nbsp;of&nbsp;the&nbsp;display&nbsp;buffer,</span><br>&nbsp; &nbsp; <span style='color:green;display:inline'>//&nbsp;but&nbsp;the&nbsp;END&nbsp;pixel&nbsp;of&nbsp;the&nbsp;first&nbsp;line.</span><br><br>&nbsp; &nbsp; pusLine<span style='color:red;display:inline'>-</span><span style='color:red;display:inline'>=</span><span style='color:purple;display:inline'>319</span><span style='color:red;display:inline'>;</span><br><br>&nbsp; &nbsp; clear_screen_arm<span style='color:red;display:inline'>(</span><span style='color:red;display:inline'>(</span>DWORD<span style='color:red;display:inline'>)</span>pusLine<span style='color:red;display:inline'>,</span><span style='color:purple;display:inline'>0xf81f</span><span style='color:red;display:inline'>)</span><span style='color:red;display:inline'>;</span>&nbsp;<span style='color:green;display:inline'>//&nbsp;0xf81f&nbsp;=&nbsp;1111100000011111&nbsp;=&nbsp;red&nbsp;+&nbsp;blue&nbsp;=&nbsp;pink</span><br>&nbsp; &nbsp; GXEndDraw<span style='color:red;display:inline'>(</span><span style='color:red;display:inline'>)</span><span style='color:red;display:inline'>;</span><br>&nbsp; &nbsp; <span style='color:blue;display:inline'>return</span>&nbsp;<span style='color:blue;display:inline'>false</span><span style='color:red;display:inline'>;</span><br><span style='color:red;display:inline'>}</span><br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>15</b> lines; <b>10</b> keywds; <b>2</b> nums; <b>30</b> ops; <b>0</b> strs; <b>5</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
<br />
I might be doing silly things with the C code.. ('cos I haven't done C for *years*)... but it compiles and has the desired effect on my iPAQ - I put the code into the FirstGX example and called it instead of their:
<br />
<br /><div class="forum_block"><b>Code:</b><br /><table cellspacing=0 cellpadding=0 width=100% border=0><tr><td bgcolor=Lavender align=right valign=top style='font-family:"courier new";font-size:11;color:black'>1&nbsp;<br></td><td bgcolor=white valign=top nowrap style='font-family:"courier new";font-size:11'><span style='color:black;display:inline'><span style='color:blue;display:inline'>bool</span>&nbsp;ClearScreen<span style='color:red;display:inline'>(</span><span style='color:blue;display:inline'>int</span>&nbsp;colRed<span style='color:red;display:inline'>,</span><span style='color:blue;display:inline'>int</span>&nbsp;colGreen<span style='color:red;display:inline'>,</span>&nbsp;<span style='color:blue;display:inline'>int</span>&nbsp;colBlue<span style='color:red;display:inline'>)</span><br></span></span></td></tr><tr><td bgcolor=Lavender></td><td bgcolor=Lavender><div style='display:inline;color:black;font-family:tahoma;font-size:9'><b>1</b> lines; <b>4</b> keywds; <b>0</b> nums; <b>4</b> ops; <b>0</b> strs; <b>0</b> coms &nbsp;&nbsp;&nbsp;<span style='color:green;display:inline'>Syntactic Coloring</span>&nbsp;v<span style='color:purple;display:inline'>0</span><span style='color:red;display:inline'>.</span><span style='color:purple;display:inline'>3</span><span style='color:red;display:inline'>&nbsp;-&nbsp;</span>Dan East &nbsp; </div></td></tr></table></div><br />
<br />
<br />
function. Adding the parameters to the C function to pass the "correct" value to the ARM function is trivial - see the thread about "How to calculate the real RGB color for GAPI? "
<br />
<a href="http://forums.pocketmatrix.com/viewtopic.php?t=4048" target="_blank">http://forums.pocketmatrix.com/viewtopic.php?t=4048</a>
for that.
<br />
<br />
(a pink screen isn't much, but it's a start. <img src="images/smiles/icon_biggrin.gif" alt="Very Happy" border="0" />).
<br />
<br />
If anybody can point out errors in the C, I'd appreciate it (do I need to cast it to a DWORD?).
<br />
<br />
Hope that helps, cheers,
<br />
<br />
Refractor.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59951"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59952"></a><a href="viewtopic.php?p=59952#59952"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 12:16 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>simonjacobs</strong><br />
pm Insider<br />
<img src="images/avatars/gallery/Simpsons/mrburns.gif" alt="" border="0" /><br />
<br />
<small>Joined: 27 Nov 2001<br />
Posts: 322<br />
Location: London, UK<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=474"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=474"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://www.xengames.com/" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
just a minor note: you only need to save r4-r11, not r0-r12
<br />
<br />
I prefer the method in my FAQ for adding seperate files just because I can then edit the asm in the evc editor, and it will automatically reassemble it when it changes.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59952"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59953"></a><a href="viewtopic.php?p=59953#59953"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 12:20 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>simonjacobs</strong><br />
pm Insider<br />
<img src="images/avatars/gallery/Simpsons/mrburns.gif" alt="" border="0" /><br />
<br />
<small>Joined: 27 Nov 2001<br />
Posts: 322<br />
Location: London, UK<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=474"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=474"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://www.xengames.com/" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
the c looks fine, you do have to compute the offset to the first pixel as you say, the only thing i would change is adding a test for the machine type. different machines will need different offsets to work.
<br />
<br />
my approach is to do all drawing to my own screen buffer then copy to display memory at the end. That is FAR faster on the iPaq than drawing directly to the screen, because the iPaq screen memory is not write-cached.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59953"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59956"></a><a href="viewtopic.php?p=59956#59956"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 12:42 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>refractor</strong><br />
pm Insider<br />
<img src="images/avatars/711.jpg" alt="" border="0" /><br />
<br />
<small>Joined: 05 Feb 2002<br />
Posts: 2259<br />
Location: Luxembourg<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=711"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=711"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
True, true, point taken... for this example.
<br />
<br />
I tend to optimise the stacking later in the process - a lot of the time I ignore the call standard conventions because I call some ARM functions only from ARM functions (I do a lot of ARM stuff largely because I'm more proficient in ARM than I am in C), later on in the process I know better what does and doesn't need to be stacked for each function, and can start eliminating excess stacking.
<br />
<br />
I always err on the side of caution to begin with and stack everything; if I called it from another ARM function, I might not expect it to corrupt the first four registers - always expecting the first 4 registers and r12 to be corrupted for every ARM routine is wasteful if you're only ever going to call one or two functions from C.
<br />
<br />
Your other comment was what I meant when I said:
<br />
<br /><div class="forum_block"><b>Quote:</b><br />(you can include a macro to compile your *.s files elsewhere in you project - this has already been discussed somewhere on this board, IIRC).</div><br />
<br />
<br />
<img src="images/smiles/icon_smile.gif" alt="Smile" border="0" />
<br />
<br />
Thanks for looking at the C. Sure, it needs to add a test for the machine type, etc, - it was just a quick example I knocked up to help the guy who started the thread.
<br />
<br />
My implementation uses double buffering at the moment, too. Whether it's faster to do so I haven't checked with my code - my code writes to the buffer in sequential order, but what it doesn't do is 24-pixel writes in a single instruction, which is more cache coherant than my STRs if nothing else.
<br />
<br />
Cheers,
<br />
<br />
Refractor.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59956"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59959"></a><a href="viewtopic.php?p=59959#59959"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 12:52 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>simonjacobs</strong><br />
pm Insider<br />
<img src="images/avatars/gallery/Simpsons/mrburns.gif" alt="" border="0" /><br />
<br />
<small>Joined: 27 Nov 2001<br />
Posts: 322<br />
Location: London, UK<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=474"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=474"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://www.xengames.com/" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
fair enough <img src="images/smiles/icon_smile.gif" alt="Smile" border="0" />
<br />
<br />
are you working on a game in assembler?
<br />
<br />
i'm busy trying to write a 3d engine, its taking a lot of effort.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59959"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59961"></a><a href="viewtopic.php?p=59961#59961"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 1:22 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>refractor</strong><br />
pm Insider<br />
<img src="images/avatars/711.jpg" alt="" border="0" /><br />
<br />
<small>Joined: 05 Feb 2002<br />
Posts: 2259<br />
Location: Luxembourg<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=711"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=711"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
I've been working on a 3d engine in dribs and drabs. At the moment I'm worked off my feet (not PocketPC related), *and* I've been offered another contract so I'm gearing up for the interview for that.. there just never seems to be enough time right now.
<br />
<br />
Essentially, yes, I'm working on several games (I never could just do one thing at once, but most of them share the same engine constituents):
<br />
<br />
a "micro-machines" clone with added 3d-ness (3d cars, obstacles, etc, but tiled-graphics thrown in too for the majority of the 'ground').
<br />
<br />
a parallax platformer game with *huge* levels (I actually started that one with the GBA in mind.. but the iPAQ will do just as nicely, if not better).. that one's stymied at the moment for technical reasons - real-time decompression of the tiled map is a sticky issue. Well, I know how to decompress it (very) efficiently.. but bizarrely it's the *compression* routine I'm stuck with (it's non-trivial to say the very least). I know how I want to compress it (in a weird way <img src="images/smiles/icon_wink.gif" alt="Wink" border="0" /> )... I just don't know how to go about doing it algorithmically without running into travelling-salesman type issues (exponential growth of the function's time to run). I'm still attacking some research papers on the techniue though, so it may turn out to be ok in a couple of months.
<br />
<br />
...after I've either played with those enough, or released them (unfortunately, don't hold your breath), I'll be playing with getting a 3d terrain engine up... or a "fake" 3d platformer.
<br />
<br />
I know *how* I'm going to do a lot of it, but I just haven't had the time to sit down and do it... Due to the way I study things I'm probably 'missing' some rudimentary knowledge too so my 'know how' may turn out to be flawed. I won't know until I do it, yet I haven't got time to do it. Aaargh, the eternal dilemma. <img src="images/smiles/icon_sad.gif" alt="Sad" border="0" /> It gets worrying when I'm annoyed at my girlfriend for arranging a one week ski holiday because I'll be without a real development environment for a *whole week*. <img src="images/smiles/icon_redface.gif" alt="Embarassed" border="0" />
<br />
<br />
If you need any help with anything that I may be able to help with (general comments, ARM stuff), give me a yell - I'm always happy when people give me things to think about.
<br />
<br />
Cheers,
<br />
<br />
Refractor<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59961"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59965"></a><a href="viewtopic.php?p=59965#59965"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 1:49 pm | Post subject: terrain</></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>wrecked</strong><br />
Guest<br />
<br />
<br />
<small><br />
<br />
<br /></small>
<br />
<br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Id like any info on how to build a terrain engine..i kinda know what you need but putting it altogether is the problem.
<br />
<br />
On another point...ive been asked to write a couple of games .. which is great , but ive been offered a profit share as payment...this is ok too, but do these things sell..is there any money in developing for the pocket pc or is it just a fun tool TO PLAY WITH..????/<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59965"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59969"></a><a href="viewtopic.php?p=59969#59969"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 2:10 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>refractor</strong><br />
pm Insider<br />
<img src="images/avatars/711.jpg" alt="" border="0" /><br />
<br />
<small>Joined: 05 Feb 2002<br />
Posts: 2259<br />
Location: Luxembourg<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=711"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=711"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Terrain engine details and some nice references here:
<br />
<a href="http://www.gamasutra.com/features/20000403/turner_pfv.htm" target="_blank">http://www.gamasutra.com/features/20000403/turner_pfv.htm</a>
(you may need to register to read it, but I can highly recommend it and it's free). If you want to program games, there's an awful lot of useful information at GamaSutra.
<br />
<br />
I'm doing my games as a side-line hobby, 'cos I'm pretty sure I'll always earn more doing what I do than being a games programmer, *especially* on a platform that's not really designed for gamers.
<br />
<br />
If you want to make money then maybe it's worth considering targeting the ARM based Gameboy Advance... but the problem there is getting a publisher.
<br />
<br />
I'm messing about with mine simply 'cos I like (where's the 'fawning' smiley when you need one?) ARM processors. iPAQs, etc, make better toys than development boards with no screen and limited upgrade potential.
<br />
<br />
I would *guess* that the games that have sold the most are aimed at middle-aged businessmen with no lives (thus, Pocket Strip Poker, SimCity2000, boring damn Golf games).
<br />
<br />
Looking at Handango, it seems that SimCity2000 has been downloaded 29511 times ($30 shareware - no idea how many people actually registered, unfortunately)... which surprised me (very much!).
<br />
... and that's just from Handango.
<br />
<br />
Hrrrrm... maybe I should try and do more to my games after all! <img src="images/smiles/icon_biggrin.gif" alt="Very Happy" border="0" />
<br />
<br />
Cheers,
<br />
<br />
Refractor.<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59969"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="59971"></a><a href="viewtopic.php?p=59971#59971"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Wed Feb 20, 2002 2:22 pm | Post subject: top one</></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>wrecked</strong><br />
Guest<br />
<br />
<br />
<small><br />
<br />
<br /></small>
<br />
<br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Great info..top read..ROAM that is...MY DAY STARTED BAD AND HAS ONLY GOT BETTER..cheers for all the help<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=59971"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table width="100%" style="font-size: 8pt; color: #000000; background-color: #9FADC4; border: 1px solid #4D6070; margin-top: 2px; padding-left: 5px;">
<tr>
<td><a name="147155"></a><a href="viewtopic.php?p=147155#147155"><img src="templates/PocketMatrix/images/icon_minipost.gif" width="12" height="9" alt="Post" title="Post" border="0" /></a>Posted: Thu May 08, 2003 5:25 pm | Post subject: </></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="150" align="left" valign="top" style="border-right: 1px dashed #9FADC4; width: 150px;"><strong>Dan East</strong><br />
Site Admin<br />
<img src="images/avatars/16.gif" alt="" border="0" /><br />
<br />
<small>Joined: 25 Jan 2001<br />
Posts: 4969<br />
Location: Virginia, USA<br /></small>
<br />
<a href="profile.php?mode=viewprofile&amp;u=16"><img src="templates/PocketMatrix/images/pm/profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a> <a href="privmsg.php?mode=post&amp;u=16"><img src="templates/PocketMatrix/images/pm/pm.gif" alt="Send private message" title="Send private message" border="0" /></a> <a href="http://dexplor.com" target="_userwww"><img src="templates/PocketMatrix/images/pm/www.png" alt="Visit poster's website" title="Visit poster's website" border="0" /></a><br />
<br />
<br />
<br /></td>
<td valign="top" style="padding-left: 8px; color: #000000">
Moved and bumped (only took 15 months to get around to it).
<br />
<br />
Jacco, I checked and you have admin access for the Overloaded forum now.
<br />
<br />
Simon, I edited two of your posts to fix formatting that was mangled when the board was converted to phpBB.
<br />
<br />
Dan East<br />
<br />
<table border="0" align="right" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td><a href="posting.php?mode=quote&amp;p=147155"><img src="templates/PocketMatrix/images/pm/quote.gif" alt="Reply with quote" title="Reply with quote" border="0" /></a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" cellspacing="2" cellpadding="2" border="0" style="font-size: 8pt; background-color: #B9C5CE; border: 1px solid #9FADC4; margin-top: 2px;">
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>[ <a href="posting.php?mode=newtopic&amp;f=5">Post new topic</a> ]</> [ <a href="posting.php?mode=reply&amp;t=4063">Reply</a> ]
</strong>
</td>
<td align="right" valign="middle">Page <b>1</b> of <b>3</b> | Goto page <b>1</b>, <a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=15">2</a>, <a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=30">3</a>&nbsp;&nbsp;<a href="viewtopic.php?t=4063&amp;postdays=0&amp;postorder=asc&amp;start=15">Next</a></td>
</tr>
</table>
<div class="seperator"></div>
<table cellspacing="2" cellpadding="2" border="0" width="100%">
<tr>
<form method="post" action="viewtopic.php?t=4063&amp;start=0">
<td align="left" valign="top">Display posts from previous: <select name="postdays"><option value="0" selected="selected">All Posts</option><option value="1">1 Day</option><option value="7">7 Days</option><option value="14">2 Weeks</option><option value="30">1 Month</option><option value="90">3 Months</option><option value="180">6 Months</option><option value="364">1 Year</option></select> <select name="postorder"><option value="asc" selected="selected">Oldest First</option><option value="desc">Newest First</option></select>
<input type="submit" value="Go" class="liteoption" name="submit" /><br /><small>All times are GMT</small></td>
</form>
<td align="right" valign="top">
<form method="get" name="jumpbox" action="viewforum.php" onSubmit="if(document.jumpbox.f.value == -1){return false;}"><table cellspacing="0" cellpadding="0" border="0">
<tr>
<td nowrap="nowrap"><span class="gensmall">Jump to:&nbsp;<select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"><option value="-1">Select a forum</option><option value="-1">&nbsp;</option><option value="-1">General Discussion</option><option value="-1">----------------</option><option value="11">General Pocket PC Discussion</option><option value="56">Smartphone/Phone Edition Discussion</option><option value="47">General Technology Discussion</option><option value="14">General Multimedia Discussion</option><option value="51">PocketMatrix Giveaways</option><option value="9">Anything Discussion</option><option value="10">PocketMatrix.com Announcements/Feedback</option><option value="-1">&nbsp;</option><option value="-1">Developer Discussion</option><option value="-1">----------------</option><option value="5"selected="selected">General Developer Discussion</option><option value="50">Marketing/Business Development Resources</option><option value="12">Job Connection</option><option value="23">GapiDraw</option><option value="22">PocketFrog & PocketHAL</option><option value="59">Edge Library</option><option value="41">Pocket Programming Language (PPL)</option><option value="6">Phantom's Forum</option><option value="-1">&nbsp;</option><option value="-1">Released Software</option><option value="-1">----------------</option><option value="21">Snails</option><option value="38">Anthelion</option><option value="3">Argentum</option><option value="35">CounterSheep</option><option value="4">DEXplor</option><option value="27">em | Motion</option><option value="43">Flux Challenge</option><option value="37">GameBox</option><option value="20">Pocket Scumm</option><option value="8">Pocket Quake 1 and 2</option><option value="2">Pocket Wolf</option><option value="29">PocketSX</option><option value="36">Tower Mogul</option><option value="55">Trisystech Discussion</option><option value="33">SpaceTime</option><option value="25">Xen Games</option><option value="-1">&nbsp;</option><option value="-1">PocketMatrix.com Forums</option><option value="-1">----------------</option><option value="39">ET Server Discussion</option></select>&nbsp;<input type="submit" value="Go" class="liteoption" /></span></td>
</tr>
</table></form>
</td>
</tr>
</table>
<div class="seperator"></div>
<table width="100%" cellspacing="2" border="0" align="center" style="font-size: 8pt">
<tr>
<td width="40%" valign="top" nowrap="nowrap" align="left"><br />
&nbsp;<br />
</td>
<td align="right" valign="top" nowrap="nowrap">You <b>cannot</b> post new topics in this forum<br />You <b>cannot</b> reply to topics in this forum<br />You <b>cannot</b> edit your posts in this forum<br />You <b>cannot</b> delete your posts in this forum<br />You <b>cannot</b> vote in polls in this forum<br />You <b>cannot</b> attach files in this forum<br />You <b>can</b> download files in this forum<br /></td>
</tr>
</table>
</td>
<td id="leftpanel"><div class="sidebar-title">
<img src="./../images/arrow.gif" width="78" height="50" /></div>
<div style="width: 180px; height: 75px" class="banner">
<a href='http://www.pocketmatrix.com/phpAdsNew/adclick.php?bannerid=11&amp;zoneid=0&amp;source=Forums+%2F+General+Developer+Discussion&amp;dest=http%3A%2F%2Fwww.pdamill.com%2Fdl_gs2.shtml' target='_blank'>[AD]<AD- 'http://www.pocketmatrix.com/images/ads/solitaire2.gif' width='180' height='75' alt='' title='' border='0'></a><div id="beacon_11" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src='http://www.pocketmatrix.com/phpAdsNew/adlog.php?bannerid=11&amp;clientid=13&amp;zoneid=0&amp;source=Forums+%2F+General+Developer+Discussion&amp;block=0&amp;capping=0&amp;cb=808c4a44c7f2ad1847df9eeffb293212' width='0' height='0' alt='' style='width: 0px; height: 0px;'></div> </div>
<div style="width: 180px; height: 75px" class="banner">
<a href='http://www.pocketmatrix.com/phpAdsNew/adclick.php?bannerid=18&amp;zoneid=0&amp;source=Forums+%2F+General+Developer+Discussion&amp;dest=http%3A%2F%2Fwww.esoftinteractive.com%2FDemo%2Ftm%2Ftmv111_demo.exe' target='_blank'>[AD]<AD- 'http://www.pocketmatrix.com/images/ads/tm_pmbanner_180x75.gif' width='180' height='75' alt='' title='' border='0'></a><div id="beacon_18" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src='http://www.pocketmatrix.com/phpAdsNew/adlog.php?bannerid=18&amp;clientid=10&amp;zoneid=0&amp;source=Forums+%2F+General+Developer+Discussion&amp;block=0&amp;capping=0&amp;cb=971b6c405337b6c6e610ea26de3945e3' width='0' height='0' alt='' style='width: 0px; height: 0px;'></div> </div>
<div class="sidebar-spacer"></div>
<div class="sidebar-title">Hosted Sites</div>
<div class="sidebar-content">
> <a href="http://www.dexplor.com/">Dexplor</a><br />
> <a href="http://www.planetschnoogie.com/">PlanetSchnoogie</a><br />
> <a href="http://quake.pocketmatrix.com/">PocketQuake</a><br />
> <a href="http://wolf.pocketmatrix.com/">Pocket Wolf3D</a><br />
> <a href="http://www.whatevergames.com/">WhateverGames</a><br />
</div>
<div class="sidebar-spacer"></div>
<div class="sidebar-title">Stores</div>
<div class="sidebar-content">
Hardware: <br />
> <a href="./../phpAdsNew/adclick.php?bannerid=20&source=sidebar&dest=http%3A//www.proportable.com/">PROPortable</a><br />
> <a href="./../phpAdsNew/adclick.php?bannerid=22&source=sidebar&dest=http%3A%2F%2Fwww.mobileplanet.com%2Figpmx%2F">Mobile Planet</a><br />
Software: <br />
> <a href="./../phpAdsNew/adclick.php?bannerid=3&source=sidebar&dest=http%3A%2F%2Fwww.pdamill.com%2Fpm.shtml">PDAmill Games</a><br />
> <a href="./../phpAdsNew/adclick.php?bannerid=14&source=sidebar&dest=http%3A//www.handango.com/ampp/store/home.jsp?siteId=812">Handango</a>
</div>
<div class="sidebar-spacer"></div>
<div class="sidebar-title">Reviews</div>
<div class="sidebar-content">
> <a href="./../reviews//"></a><br />
> <a href="./../reviews//"></a><br />
> <a href="./../reviews//"></a><br />
> <a href="./../reviews/c600/">Orange SPV C600 / i-mate SP5 Preview</a><br />
> <a href="./../reviews/arvale/">Arvale: Journey of Illusion</a><br />
</div>
<div class="sidebar-spacer"></div>
<div class="sidebar-title">Advertisement</div>
<div class="sidebar-banner">
<script type="text/javascript"><!--
google_ad_client = "pub-4454134257841614";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel ="6388997368";
google_color_border = "4D6070";
google_color_bg = "9FADC4";
google_color_link = "122A5A";
google_color_url = "233B6B";
google_color_text = "233B6B";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><div id="beacon_19" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src='http://www.pocketmatrix.com/phpAdsNew/adlog.php?bannerid=19&amp;clientid=4&amp;zoneid=0&amp;source=Forums+%2F+General+Developer+Discussion&amp;block=0&amp;capping=0&amp;cb=9d95f45b2c9f2d667bf89cd55ad96ab5' width='0' height='0' alt='' style='width: 0px; height: 0px;'></div> </div></td></tr>
<tr>
<td></td>
<td class="copyright"><br />
<a href="/privacy/">Privacy Policy</a> | Copyright &copy;2005 PocketMatrix.com
[pm 3.0] | <strong><a href="/rss/">RSS Feed</a></strong><br />
<div align="center"><br />
<!--
We request you retain the full copyright notice below including the link to www.phpbb.com.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
reason) retain the full copyright we request you at least leave in place the
Powered by phpBB {PHPBB_VERSION} line, with phpBB linked to www.phpbb.com. If you refuse
to include even this then support on our forums may be affected.
The phpBB Group : 2002
// -->
Powered by <a href="http://www.phpbb.com/" target="_phpbb">phpBB</a> 2.0.11pm&copy; 2001, 2002 phpBB Group</div>
<br>
</td>
<td></td>
</tr>
</table>
</body></html>