1
0
mirror of https://github.com/danbee/8080 synced 2025-03-04 08:39:07 +00:00

Working with opcode in separate function

This commit is contained in:
Daniel Barber 2015-12-11 10:54:29 +01:00
parent 9b62cdc774
commit 3b7c42ceec
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -1,6 +1,6 @@
use std::io::{self, Read};
fn opcode(input: &Vec<u8>, counter: &usize) -> usize {
fn opcode(input: &Vec<u8>, counter: usize) -> usize {
let size: usize;
let opcode = input[counter];
@ -50,7 +50,7 @@ fn main() {
while counter < input.len() {
// get the instruction
oplength = opcode(&input, &counter);
oplength = opcode(&input, counter);
counter += oplength;
}
}