GAS Informações do sistema
Publicado por Perfil removido (última atualização em 12/08/2011)
[ Hits: 5.031 ]
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)
Árvore binária de busca em Assembler 8086
Escrita de um número em octal na tela em Assembly Puro para Linux 64 bits (GNU Assembler)
"Clear Screen" para Linux x86 em Assembly Puro (GNU Assembly)
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Ativando e usando "zoom" no ambiente Cinnamon
Vídeo Nostálgico de Instalação do Conectiva Linux 9
Como realizar um ataque de força bruta para desobrir senhas?
Eu queria adicionar a incon do wifi e deixa transparente no fluxbox no... (4)
Thinkpads são bons mesmo ?! (4)
existe algum hub de jogos online similiar ou igual dos browser (6)
Como botar o efeito de deslocar janelas (win + setas - windows) no lin... (0)









