; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01 

	TITLE	C:\Documents and Settings\Administrator\my documents\visual studio 2010\Projects\test\test\main.cpp
	.686P
	.XMM
	include listing.inc
	.model	flat

INCLUDELIB OLDNAMES

PUBLIC	??_C@_0BD@FOOJNHEP@welcome?5i?5am?5here?4?$AA@	; `string'
;	COMDAT ??_C@_0BD@FOOJNHEP@welcome?5i?5am?5here?4?$AA@
CONST	SEGMENT
??_C@_0BD@FOOJNHEP@welcome?5i?5am?5here?4?$AA@ DB 'welcome i am here.', 00H ; `string'
CONST	ENDS
PUBLIC	?write_string@@YAXDPBD@Z			; write_string
; Function compile flags: /Ogtp
; File c:\documents and settings\administrator\my documents\visual studio 2010\projects\test\test\main.cpp
;	COMDAT ?write_string@@YAXDPBD@Z
_TEXT	SEGMENT
?write_string@@YAXDPBD@Z PROC				; write_string, COMDAT

; 6    : {

	push	esi
	mov	ecx, OFFSET ??_C@_0BD@FOOJNHEP@welcome?5i?5am?5here?4?$AA@

; 7    : 	    volatile char* video = (volatile char*)0xB8000;

	mov	eax, 753664				; 000b8000H

; 8    : 		for (int i=1; i<5; i++)

	mov	esi, 4
$LL3@write_stri:

; 9    : 		{
; 10   :         *video++ = *string++;

	mov	dl, BYTE PTR [ecx]
	mov	BYTE PTR [eax], dl

; 11   :         *video++ = colour;

	mov	BYTE PTR [eax+1], 63			; 0000003fH
	inc	ecx
	add	eax, 2
	dec	esi
	jne	SHORT $LL3@write_stri
	pop	esi

; 12   : 		}
; 13   : 
; 14   : }

	ret	0
?write_string@@YAXDPBD@Z ENDP				; write_string
_TEXT	ENDS
PUBLIC	_Kernel_Start
; Function compile flags: /Ogtp
;	COMDAT _Kernel_Start
_TEXT	SEGMENT
_Kernel_Start PROC					; COMDAT

; 15   : EXPORT NORETURN void Kernel_Start(){

	push	esi

; 16   : 
; 17   : 	_asm {
; 18   : 		cli

	cli

; 19   : 		mov ax, 10h

	mov	ax, 16					; 00000010H

; 20   : 		mov ds, ax

	mov	ds, ax

; 21   : 		mov es, ax

	mov	es, ax

; 22   : 		mov fs, ax

	mov	fs, ax

; 23   : 		mov gs, ax

	mov	gs, ax

; 24   : 	}
; 25   : write_string(0x3f,"welcome i am here.");

	mov	ecx, OFFSET ??_C@_0BD@FOOJNHEP@welcome?5i?5am?5here?4?$AA@
	mov	eax, 753664				; 000b8000H
	mov	esi, 4
$LL7@Kernel_Sta:
	mov	dl, BYTE PTR [ecx]
	mov	BYTE PTR [eax], dl
	mov	BYTE PTR [eax+1], 63			; 0000003fH
	inc	ecx
	add	eax, 2
	dec	esi
	jne	SHORT $LL7@Kernel_Sta

; 26   : 
; 27   : 	_asm {
; 28   : 		cli

	cli

; 29   : 		hlt

	hlt
$LL2@Kernel_Sta:

; 30   : 	}
; 31   : 	for (;;);

	jmp	SHORT $LL2@Kernel_Sta
_Kernel_Start ENDP
_TEXT	ENDS
END
