GAS Informações do sistema
Publicado por Perfil removido (última atualização em 12/08/2011)
[ Hits: 4.772 ]
Mostra as informações do sistema, tais como RAM livre, Swap, Número de processos, etc...
.section .data espaco: .ascii "\n" strEmb: .ascii "\nInformações do Sistema \n===============================\n" strUp: .ascii "Up time: " numUp: .ascii " \n" strMem: .ascii "Total de Memória RAM: " strMemL: .ascii "Total de Memória RAM Livre: " strMemShared: .ascii "Memória RAM Compartilhada: " strBufRam: .ascii "Buffer Ram: " strSwap: .ascii "Total Swap: " strSwapL: .ascii "Espaço Livre de Swap: " strProc: .ascii "Procs: " strHigh: .ascii "Total High: " strUn: .ascii "Mem. Unit: " strCpu: .ascii "Seu processador é: " output: .ascii " xxxxxxxxxxxx " numMem: .ascii " \n" uptime: .int 0 load1: .int 0 load5: .int 0 load15: .int 0 totalram: .int 0 freeram: .int 0 sharedram: .int 0 bufferram: .int 0 totalswap: .int 0 freeswap: .int 0 procs: .byte 0, 0 totalhigh: .int 0 memunit: .int 0 .section .text _start: movl $4, %eax movl $1, %ebx movl $strEmb, %ecx movl $59, %edx int $0x80 movl $uptime, %ebx call saida movl $numUp, %edi call print movl $4, %eax movl $1, %ebx movl $strUp, %ecx movl $9, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numUp, %ecx movl $11, %edx int $0x80 movl $totalram, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strMem, %ecx movl $22, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $freeram, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strMemL, %ecx movl $28, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $sharedram, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strMemShared, %ecx movl $28, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $bufferram, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strBufRam, %ecx movl $12, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $totalswap, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strSwap, %ecx movl $12, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $totalswap, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strSwapL, %ecx movl $23, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $procs, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strProc, %ecx movl $7, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $totalhigh, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strHigh, %ecx movl $12, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $memunit, %ecx call saida movl $numMem, %edi call print movl $4, %eax movl $1, %ebx movl $strUn, %ecx movl $11, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $numMem, %ecx movl $11, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $strCpu, %ecx movl $19, %edx int $0x80 movl $0, %eax cpuid movl $output, %edi inc %edi movl %ebx, (%edi) addl $4, %edi movl %edx, (%edi) addl $4, %edi movl %ecx, (%edi) movl $4, %eax movl $1, %ebx movl $output, %ecx movl $13, %edx int $0x80 movl $4, %eax movl $1, %ebx movl $espaco, %ecx movl $2, %edx int $0x80 movl $1, %eax int $0x80 saida: movl $116, %eax int $0x80 movl %ecx, %eax movl (%eax), %eax ret print: addl $10, %edi movl $10, %ecx call converte ret converte: dec %edi dec %ecx movl $0, %edx movl $10, %ebx divl %ebx addl $48, %edx movb %edx, (%edi) cmp $0, %ecx jne converte ret #@
Relógio em assembly NES 8 bits (variante do 6502)
Escrita de número em hexadecimal em Assembly Puro para Linux 64bits (Nasm - Netwide Assemble)
Escrita de um número em hexadecimal na tela em Assembly Puro para Linux x86 (GNU Assembly)
Escrita de um número em binário na tela em Assembly Puro para Linux 64 bits (GNU Assem
Título: Descobrindo o IP externo da VPN no Linux
Armazenando a senha de sua carteira Bitcoin de forma segura no Linux
Enviar mensagem ao usuário trabalhando com as opções do php.ini
Encontre seus arquivos facilmente com o Drill
Mouse Logitech MX Ergo Advanced Wireless Trackball no Linux
Compartilhamento de Rede com samba em modo Público/Anônimo de forma simples, rápido e fácil
Cups: Mapear/listar todas as impressoras de outro Servidor CUPS de forma rápida e fácil
Letra "F" minuscula não está Funcionando no Linux Mint (2)
Depois que instalei o linux mint em dualboot com Windows em btrfs o co... (5)
Como instalar kernel oficial do site kernel.org no linux mint (1)
Olá quais distribuições recomendam para usar no dia a dia. (11)