Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - May I ask to use assembly language for implement the memory check module.: (1 Item)
   
May I ask to use assembly language for implement the memory check module.  
May I ask to use assembly language for implement the memory check module.

 

 

So I already try to simulate that environment of MINGW on Windows XP,

And next step, Start to write assembly code for QNX6.4.0.

 

So Please see following sample code,

 

And Now have not understanding that use the software interrupt for output to stdio.

 

Please let me know how to output to stdio on assembly environment.

 

Regards, 

Kengo Kinoshita.


--Sample code --

 

.file   "main.s"
.data
msg:    .ascii  "hello world\n"
msgend: .equ    len, msgend - msg

.global main
main:


        movl $??,        %eax    # write system call(sys_write)
        movl $??,        %ebx    #output to  stdout
        movl $msg,      %ecx
        movl $len,      %edx
        int  $????
        ret


--Linux case--

.file   "main.s"
.data
msg:    .ascii  "hello world\n"
msgend: .equ    len, msgend - msg

.global main
main:
        movl $4,        %eax    # write system call(sys_write)
        movl $1,        %ebx    # output to stdout
        movl $msg,      %ecx
        movl $len,      %edx
        int  $0x80
        ret