<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tokuchan3515</author_name>
  <author_url>https://blog.hatena.ne.jp/tokuchan3515/</author_url>
  <blog_title>備忘録やめた</blog_title>
  <blog_url>https://tokuchan3515.hatenablog.com/</blog_url>
  <categories>
    <anon>Rust</anon>
  </categories>
  <description>OSを書く場合などでは，しばしばあるアドレスを基準とした相対アドレスが必要となる場合があります．例えばVideo RAM（VRAM）へのアクセスでは，VRAMの開始アドレスを基準として，アクセスしたい画面上の座標と，解像度を用いて最終的なVRAM上の番地を確定します． let ptr = vram.base + y * vram.resolution.x + x; この時，baseが生ポインタである場合，一見するとoffsetメソッドが使用可能であると思うかもしれません． let ptr = vram.base.offset(y * vram.resolution.x + x); しかし，Ru…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftokuchan3515.hatenablog.com%2Fentry%2F2020%2F09%2F16%2F154147&quot; title=&quot;`offset`ではなく，整数型にキャストして演算する - 備忘録やめた&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-16 15:41:47</published>
  <title>`offset`ではなく，整数型にキャストして演算する</title>
  <type>rich</type>
  <url>https://tokuchan3515.hatenablog.com/entry/2020/09/16/154147</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
