<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">We are working on a project that needs use of assembly language, to develop low-level programs for Openmoko. However, I am facing a problem while using assembly.<br><br>When I write a very simple program (that just exits the program on arm architecture):<br><br><div style="margin-left: 80px;"><font style="font-family: Courier New,courier,monaco,monospace,sans-serif;" size="2">.section .text<br>.globl _start<br><br>_start:<br>SWI 0x11</font><br></div><br>and compile it using GNU Assembler, provided with the toolchain for Openmoko. It just compiles fine, and then it is also linked and run fine using the Openmoko Toolchain. As shown below:<br><br><div style="margin-left: 40px;"><font size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">[root@dhcppc7 arm]#
 arm-angstrom-linux-gnueabi-as test.S -o test.obj</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">[root@dhcppc7 arm]# arm-angstrom-linux-gnueabi-ld test.obj -o test</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">[root@dhcppc7 arm]# arm-angstrom-linux-gnueabi-run test</span></font><br></div><br>It works fine. (I have also tried it to print text on screen it also works fine when using <span style="font-style: italic; font-weight: bold; text-decoration: underline;">arm-angstrom-linux-gnueabi-run </span>simulator, but never works when sent to Openmoko)<br><br>However, when I copy this compiled file test to Openmoko and run it there it gives this error:<br><br><div style="margin-left: 40px;"><font style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;" size="2">root@om-gta02:/usr/src/assembly# ./test<br>Illegal instruction</font><br></div><br><br><font size="3"><span style="font-family: arial,helvetica,sans-serif;">The exact statement at which the error occurs is:</span></font><br style="font-family: arial,helvetica,sans-serif;"><div style="margin-left: 40px;"><font style="font-family: Courier New,courier,monaco,monospace,sans-serif;" size="2"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">SWI 0x11</span></font><br style="font-family: arial,helvetica,sans-serif;"></div><font style="font-family: Courier New,courier,monaco,monospace,sans-serif;" size="2"><font style="font-family: arial,helvetica,sans-serif;" size="3"><br>and the error is same for all numbers given after SWI except for 0x0.<br><br>However, I have written and tried programs that does not use any software interrupts and they work just fine.<br><br>Please help me how can
 I use software interrupts, It would be of great help in our project.<br><br><span style="font-weight: bold;">Regards,</span><br>Waqar Ali<br>Research Engineer,<br>Next Generation Intelligent Networks Research Center (NexGin RC)</font><br></font></div><br>

      </body></html>