Luc@s
06-09-2004, 21:59
[BITS 16]
[ORG 0100h] ; for .com
[SECTION .text]
start:
mov dx, Title
call print
mov eax, 0
cpuid
mov [VendorStr], ebx
mov [VendorStr+4], edx
mov [VendorStr+8], ecx
mov dx, VendorStr
call print
; Print a string
; Input: Dx => string offset
print:
; set int 21h service 09h
mov ah, 09h
int 21h
ret
; Print a string and go to new line
; Input: Dx => string offset
println:
; set int 21h service 09h
mov ah, 09h
int 21h
mov dx, NewLine
call print
ret
exit:
; set int 21h service 4Ch(exit)
mov ah, 4Ch
int 21h
[SECTION .data]
NewLine db 13, 10, '$'
Title db "Lucas CPUID program", 13, 10, '$'
[SECTION .bss]
VendorStr resb 12 ; Reserve 12 bytes for cpu's vendor string
Il risultato sul mio xp2600+ č quello in allegato!
A me interessano solo le prime 2 linee.......perche stampa tutta sta roba inutile??
P.S: qualcuno puo provarlo su intel e dirmi cosa dice?
[ORG 0100h] ; for .com
[SECTION .text]
start:
mov dx, Title
call print
mov eax, 0
cpuid
mov [VendorStr], ebx
mov [VendorStr+4], edx
mov [VendorStr+8], ecx
mov dx, VendorStr
call print
; Print a string
; Input: Dx => string offset
print:
; set int 21h service 09h
mov ah, 09h
int 21h
ret
; Print a string and go to new line
; Input: Dx => string offset
println:
; set int 21h service 09h
mov ah, 09h
int 21h
mov dx, NewLine
call print
ret
exit:
; set int 21h service 4Ch(exit)
mov ah, 4Ch
int 21h
[SECTION .data]
NewLine db 13, 10, '$'
Title db "Lucas CPUID program", 13, 10, '$'
[SECTION .bss]
VendorStr resb 12 ; Reserve 12 bytes for cpu's vendor string
Il risultato sul mio xp2600+ č quello in allegato!
A me interessano solo le prime 2 linee.......perche stampa tutta sta roba inutile??
P.S: qualcuno puo provarlo su intel e dirmi cosa dice?