Skip to content

Instantly share code, notes, and snippets.

View Stateford's full-sized avatar

Dimitri Stateford

  • Bittware
  • New Hampshire
View GitHub Profile
@Stateford
Stateford / main.cpp
Created July 24, 2021 06:54
Message loop + mutex lock
#include "message_queue.h"
#include <iostream>
enum class Message
{
Message,
End
};
void main(void)
extern crate winapi;
use winapi::shared::windef::{HWND};
use winapi::shared::minwindef::{LPARAM, DWORD, HMODULE};
use winapi::um::winuser::{EnumWindows, IsWindowVisible, GetWindowTextW};
use winapi::um::psapi::{EnumProcesses, EnumProcessModules, GetModuleBaseNameW};
use winapi::um::winnt::{PROCESS_QUERY_INFORMATION, PROCESS_VM_READ};
use winapi::um::processthreadsapi::{OpenProcess};
const MAX_BUFFER_SIZE: usize = 1024;
.equ baud=9600 ;Baud rate
.equ fosc=16000000 ;Crystal frequency
.DEF COUNTER = R21
.ORG 0x00
RJMP RESET
.ORG INT0addr
RJMP INT_HANDLER
! vim: set filetype=xdefaults :
*foreground: #D7D0C7
*background: #151515
!black
! *color0: #AF875F
! *color8: #AF875F
*color0: #101010
*color8: #404040
!red
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->