This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mov ax, bx | |
// instruction - dest reg | |
// 6 bits(bit pattern for mov) - D W | MOD (2) - REG(3) - R/M(3) | |
use std::fmt::Display; | |
const REG_NAMES_R: [&str; 8] = ["al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"]; | |
const REG_NAMES_W: [&str; 8] = ["ax", "cx", "dx", "bx", "sp", "bp", "si", "di"]; | |
#[repr(u8)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use serde::Deserialize; | |
use std::{ | |
fs::File, | |
io::{BufReader, Read}, | |
time::Instant, | |
}; | |
#[derive(Deserialize)] | |
struct Pair { | |
x0: f32, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Blob extends StatelessWidget { | |
final double rotation; | |
final double scale; | |
final Color color; | |
const Blob({@required this.color, this.rotation = 0, this.scale = 1}) | |
: assert(color != null); | |
@override | |
Widget build(BuildContext context) { |