mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
18 lines
325 B
Go
18 lines
325 B
Go
package aml
|
|
|
|
// Args: src dst
|
|
// Store src into dst applying any required conversion.
|
|
func vmOpStore(ctx *execContext, ent Entity) *Error {
|
|
args := ent.getArgs()
|
|
if len(args) != 2 {
|
|
return errArgIndexOutOfBounds
|
|
}
|
|
|
|
val, err := vmLoad(ctx, args[0])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return vmStore(ctx, val, args[1])
|
|
}
|