--- nono/vm/iodevstream.h 2026/04/29 17:04:41 1.1.1.3 +++ nono/vm/iodevstream.h 2026/04/29 17:05:17 1.1.1.4 @@ -79,6 +79,22 @@ class IODeviceStream Write16(data & 0xffff); } + // LE で2バイト書き込んでポインタを進める。addr はアラインしてなくてよい + void Write16LE(uint32 data) + { + Write8(data & 0xff); + Write8(data >> 8); + } + + // 文字列を書き込んでポインタを進める。 + void WriteString(const char *p) + { + while (*p) { + Write8(*p++); + } + Write8('\0'); + } + // アドレスも指定する版。ポインタは同様に進める uint64 Read8(uint32 a) { SetAddr(a);