GAS Informações do sistema
Publicado por Perfil removido (última atualização em 12/08/2011)
[ Hits: 4.751 ]
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 #@
Soma dois números lidos da memória
Escrita de um número em octal na tela em Assembly Puro para Linux x86 (Nasm - Netwide Assembler)
GAS Inteiro para String (formato binário)
"Clear Screen" para Linux x86 em Assembly Puro (GNU Assembly)
Enviar mensagem ao usuário trabalhando com as opções do php.ini
Meu Fork do Plugin de Integração do CVS para o KDevelop
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
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
Criando uma VPC na AWS via CLI
Tem como instalar o gerenciador AMD Adrenalin no Ubuntu 24.04? (15)
Tenho dois Link's ( IP VÁLIDOS ), estou tentando fazer o failover... (0)
Pendrive não formata de jeito nenhum (4)