MCPcopy Create free account

hub / github.com/KuldeepSinh/lc3_vm / functions

Functions119 in github.com/KuldeepSinh/lc3_vm

↓ 28 callersMethodtv_sec
(&self)
src/sys/time.rs:186
↓ 14 callersMethodget
`get` returns Some(OpCode), when a valid value (between 0 to 15) is passed, otherwise it returns None.
src/hardware/instructions/opcode.rs:57
↓ 14 callersMethodupdate
(&mut self, index: u16, value: u16)
src/hardware/register/mod.rs:63
↓ 12 callersMethodtv_nsec
(&self)
src/sys/time.rs:190
↓ 11 callersMethodinsert
(&mut self, fd: RawFd)
src/sys/select.rs:24
↓ 11 callersFunctionsign_extend
`sign_extend` is used to convert a 5 bit number into an equivalent 16 bit number.
src/hardware/instructions/mod.rs:21
↓ 11 callersMethodtv_usec
(&self)
src/sys/time.rs:417
↓ 9 callersMethodnum_microseconds
(&self)
src/sys/time.rs:166
↓ 9 callersMethodnum_nanoseconds
(&self)
src/sys/time.rs:170
↓ 7 callersFunctionupdate_r_cond_register
The R_COND register stores condition flags which provide information about the most recently executed calculation. Any time a value is written to a re
src/hardware/register/condition_flag.rs:37
↓ 6 callersMethodread
(&mut self, address: u16)
src/hardware/memory/mod.rs:32
↓ 6 callersFunctionrestore_terminal_settings
()
src/sys/terminal.rs:21
↓ 4 callersMethodnum_seconds
(&self)
src/sys/time.rs:154
↓ 4 callersMethodwrite
(&mut self, address: usize, value: u16)
src/hardware/memory/mod.rs:28
↓ 3 callersFunctiondiv_mod_floor_64
(this: i64, other: i64)
src/sys/time.rs:497
↓ 3 callersFunctionget_char
`get_char` calls external (C) function getchar using libc.
src/sys/getchar.rs:7
↓ 3 callersFunctionlast
()
src/sys/errno.rs:127
↓ 3 callersMethodremove
(&mut self, fd: RawFd)
src/sys/select.rs:28
↓ 2 callersMethodcmp
The implementation of cmp is simplified by assuming that the struct is normalized. That is, tv_nsec must always be within [0, 1_000_000_000)
src/sys/time.rs:92
↓ 2 callersMethoddesc
(self)
src/sys/errno.rs:56
↓ 2 callersFunctionerrno_location
()
src/sys/errno.rs:10
↓ 2 callersFunctionfrom_i32
(e: i32)
src/sys/errno.rs:816
↓ 2 callersMethodget
(&self, index: u16)
src/hardware/register/mod.rs:79
↓ 1 callersFunctionadd
- ADD takes two values and stores them in a register. - In register mode, the second value to add is found in a register. - In immediate mode, the sec
src/hardware/instructions/add.rs:15
↓ 1 callersFunctionand
If bit [5] is 0, the second source operand is obtained from SR2. If bit [5] is 1, the second source operand is obtained by sign-extending the imm5 fie
src/hardware/instructions/and.rs:10
↓ 1 callersFunctionbr
The condition codes specified by the state of bits [11:9] are tested. If bit [11] is set, N is tested; if bit [11] is clear, N is not tested. If bit [
src/hardware/instructions/br.rs:8
↓ 1 callersFunctioncheck_key
()
src/hardware/memory/mod.rs:63
↓ 1 callersFunctionclear
Sets the platform-specific errno to no-error
src/sys/errno.rs:42
↓ 1 callersMethodclear
(&mut self)
src/sys/select.rs:36
↓ 1 callersMethodclone
(&self)
src/hardware/memory/mod.rs:46
↓ 1 callersFunctiondesc
(errno: Errno)
src/sys/errno.rs:131
↓ 1 callersFunctiondiv_floor_64
(this: i64, other: i64)
src/sys/time.rs:502
↓ 1 callersFunctiondiv_rem_64
(this: i64, other: i64)
src/sys/time.rs:518
↓ 1 callersFunctionerrno
Returns the platform-specific value of errno
src/sys/errno.rs:47
↓ 1 callersFunctionexecute_instruction
(instr: u16, mut registers: &mut Registers, mut memory: &mut Memory)
src/hardware/instructions/opcode.rs:80
↓ 1 callersFunctionexecute_program
(mem: Memory)
src/hardware/mod.rs:13
↓ 1 callersFunctionextract_op_code
Each instruction is 16 bits long, with the left 4 bits storing the opcode. The rest of the bits are used to store the parameters. To extract left 4 bi
src/hardware/instructions/opcode.rs:107
↓ 1 callersFunctionhandle_args
`handle_args` fn processes commandline arguments. If appropriate file path is found in the args, it reads the file into the memory.
src/lib.rs:19
↓ 1 callersFunctionhandle_control_c
(sig: i32)
src/sys/terminal.rs:9
↓ 1 callersMethodhighest
Finds the highest file descriptor in the set. Returns `None` if the set is empty. This can be used to calculate the `nfds` parameter of the [`select
src/sys/select.rs:48
↓ 1 callersFunctionjmp
The program unconditionally jumps to the location specified by the contents of the base register. Bits [8:6] identify the base register. `RET` is list
src/hardware/instructions/jmp.rs:7
↓ 1 callersFunctionjsr
First, the incremented PC is saved in R7. This is the linkage back to the calling routine. Then the PC is loaded with the address of the first instruc
src/hardware/instructions/jsr.rs:11
↓ 1 callersFunctionld
An address is computed by sign-extending bits [8:0] to 16 bits and adding this value to the incremented PC. The contents of memory at this address are
src/hardware/instructions/ld.rs:9
↓ 1 callersFunctionldi
An address is computed by sign-extending bits [8:0] to 16 bits and adding this value to the incremented PC. What is stored in memory at this address i
src/hardware/instructions/ldi.rs:9
↓ 1 callersFunctionldr
An address is computed by sign-extending bits [5:0] to 16 bits and adding this value to the contents of the register specified by bits [8:6]. The cont
src/hardware/instructions/ldr.rs:10
↓ 1 callersFunctionlea
An address is computed by sign-extending bits [8:0] to 16 bits and adding this value to the incremented PC. This address is loaded into DR.‡ The condi
src/hardware/instructions/lea.rs:7
↓ 1 callersMethodmicros_mod_sec
(&self)
src/sys/time.rs:405
↓ 1 callersFunctionmod_floor_64
(this: i64, other: i64)
src/sys/time.rs:510
↓ 1 callersMethodnanos_mod_sec
(&self)
src/sys/time.rs:178
↓ 1 callersFunctionnot
The bit-wise complement of the contents of SR is stored in DR. The condi- tion codes are set, based on whether the binary value produced, taken as a 2
src/hardware/instructions/not.rs:7
↓ 1 callersFunctionread_file
`read_file` fn reads a file into the LC-3 Memory. LC-3 programs are big-endian, but most of the modern computers we use are little endian. As a result
src/file.rs:17
↓ 1 callersFunctionread_file_into_lc3_memory
(mut rdr: R)
src/file.rs:23
↓ 1 callersFunctionselect
Monitors file descriptors for readiness Returns the total number of ready file descriptors in all sets. The sets are changed so that all file descrip
src/sys/select.rs:83
↓ 1 callersFunctionspawn_control_c_handler
When the program is interrupted (with pressing `Control-C` keys), we want to restore the terminal settings back to normal. `spawn_control_c_handler` f
src/sys/terminal.rs:39
↓ 1 callersFunctionst
The contents of the register specified by SR are stored in the memory location whose address is computed by sign-extending bits [8:0] to 16 bits and a
src/hardware/instructions/st.rs:7
↓ 1 callersFunctionsti
The contents of the register specified by SR are stored in the memory location whose address is obtained as follows: Bits [8:0] are sign-extended to 1
src/hardware/instructions/sti.rs:8
↓ 1 callersFunctionstr
The contents of the register specified by SR are stored in the memory location whose address is computed by sign-extending bits [5:0] to 16 bits and a
src/hardware/instructions/str.rs:8
↓ 1 callersFunctiontrap
`trap` fn allows interacting with I/O devices First R7 is loaded with the incremented PC. (This enables a return to the instruction physically followi
src/hardware/instructions/trap.rs:37
↓ 1 callersFunctionturn_off_canonical_and_echo_modes
()
src/sys/terminal.rs:28
Methodadd
(self, rhs: TimeSpec)
src/sys/time.rs:206
Methodas_errno
Convert this `Error` to an [`Errno`](enum.Errno.html).
src/sys/mod.rs:38
Methodas_ref
(&self)
src/sys/time.rs:65
Methodclear
()
src/sys/errno.rs:64
Methodcontains
(&mut self, fd: RawFd)
src/sys/select.rs:32
Methoddescription
(&self)
src/sys/mod.rs:75
Methoddescription
(&self)
src/sys/errno.rs:110
Methoddiv
(self, rhs: i32)
src/sys/time.rs:235
Methodeq
The implementation of cmp is simplified by assuming that the struct is normalized. That is, tv_nsec must always be within [0, 1_000_000_000)
src/sys/time.rs:82
Functionextract_test
()
src/hardware/instructions/opcode.rs:115
Functionfdset_clear
()
src/sys/select.rs:166
Functionfdset_highest
()
src/sys/select.rs:180
Functionfdset_insert
()
src/sys/select.rs:137
Functionfdset_remove
()
src/sys/select.rs:150
Methodfmt
(&self, f: &mut fmt::Formatter)
src/sys/mod.rs:86
Methodfmt
(&self, fmt: &mut fmt::Formatter)
src/sys/time.rs:71
Methodfmt
(&self, f: &mut fmt::Formatter)
src/sys/errno.rs:116
Methodfrom
(errno: Errno)
src/sys/mod.rs:63
Methodfrom
(err: Errno)
src/sys/errno.rs:122
Methodfrom_errno
Create a nix Error from a given errno
src/sys/mod.rs:47
Methodfrom_i32
(err: i32)
src/sys/errno.rs:60
Methodget_flag_value
`get_flag_value` function returns `u8` value for the `ConditionFlag` passed to its argument. - `ConditionFlag::FlPos` = 1, Positive - `ConditionFlag::
src/hardware/register/condition_flag.rs:25
Methodhours
(hours: i64)
src/sys/time.rs:12
Methodinvalid_argument
Create a new invalid argument error (`EINVAL`)
src/sys/mod.rs:57
Methodlast
Get the current errno and convert it to a nix Error
src/sys/mod.rs:52
Methodlast
()
src/sys/errno.rs:52
Functionmain
()
src/main.rs:9
Functionmemory_size
()
src/hardware/memory/mod.rs:81
Functionmemory_size_constant
()
src/hardware/memory/mod.rs:87
Methodmicroseconds
(microseconds: i64)
src/sys/time.rs:132
Methodmilliseconds
(milliseconds: i64)
src/sys/time.rs:122
Methodminutes
(minutes: i64)
src/sys/time.rs:20
Methodmul
(self, rhs: i32)
src/sys/time.rs:222
Methodnanoseconds
(nanoseconds: i64)
src/sys/time.rs:142
Methodneg
(self)
src/sys/time.rs:198
Methodnew
()
src/sys/select.rs:18
Methodnew
()
src/hardware/memory/mod.rs:23
Methodnew
`new()` is an associated method of `Registers`. It is used to initialize all the registers to zero, except `r_pc`, which represents the program counte
src/hardware/register/mod.rs:48
Methodnum_hours
(&self)
src/sys/time.rs:33
Methodnum_milliseconds
(&self)
src/sys/time.rs:162
Methodnum_minutes
(&self)
src/sys/time.rs:38
next →1–100 of 119, ranked by callers