Jump to content


Photo

Xdk-free Development Of Xbe


  • Please log in to reply
No replies to this topic

#1 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 12 June 2008 - 01:36 PM

This is from the ASM Community - ASM Book -XBOX NASM , I take no credit for it.

CODE

%include "kernel.inc"
%include "xbe.inc"

IMPORT    KeTickCount
IMPORT    HalReturnToFirmware

;##### XBOX Program Entry Point #####
XBE_START

;#### Paint the Screen ####
    mov    ebx,VIDEO_MEMORY
    mov    ecx,VIDEO_LIMIT
fill:
    mov    BYTE[ebx+1],0xFF
    add    ebx,4
    cmp    ebx,ecx
    jl    fill

;#### Small Wait Loop (5 seconds) ####
    mov    ebx,DWORD[KeTickCount]
    mov    ecx,DWORD[ebx]
    add    ecx,5000
.wait_loop:
    cmp    DWORD[ebx],ecx
    jl    .wait_loop

;#### Return to Dashboard ####
    push    DWORD    0x02
    call    [HalReturnToFirmware]
jmp $

;##### End of XBOX Program #####
XBE_END


The two .inc files can be found at the website and exports the xbox kernel's API like NtOpenFile and HalWriteSMBusValue and also the XBE header etc. So you can do XDK-free programming with NASM which is freely available.









0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users