IRC channel logs

2020-02-10.log

back to list of logs

***dongcarl8 is now known as dongcarl
***mniip_ is now known as mniip
<fossy>OriansJ: how do I define a double in m1
<fossy>Equivalent of "dd" instruction in m1
<fossy>in nasm
<OriansJ>fossy: depends if you are doing db to create a string "string" or write a byte in hex 'aa bb cc dd ee' or do a common definition like DEFINE NULL 00000000
<OriansJ>or if you are just trying to put a number like dd 42 -> %42
<OriansJ>or an address dd $ -> :foo &foo
<OriansJ>fossy: another good way to know how nasm code translates to M1;; simply compare the NASM versions and with M1 versions of cc_* in mescc-tools-seed
<OriansJ>as it does cover every single bit of NASM functionality you would need to write a C compiler in Assembly and the M1 things required to do the exact same thing.
<fossy>dd 0x280284849 (not those numbers) is what I am trying to translate
<fossy>and okey dokey
<OriansJ>fossy: 0x280284849 is a 5byte number and wouldn't fit in 4bytes; in which case instead of %0xabcdef you would need to do '0280284849'
<deesix>aren't 0-starting numbers considered octal by M1? I think I tested that.
<deesix>when 0 but not 0x nor 0b
<deesix>hmm, the single quote
<deesix>that'd be a string, I guess
<OriansJ>nope a hex literal
<OriansJ>as in when M1 get a 'garbage' it'll just strip off the 's and dump what is inside for hex2 to deal with
<deesix>I see, process-string call hexify-string for single quoted strings
<OriansJ>It is a dense way of saying "hold my beer, I know what I am doing"
<OriansJ>Which sometimes you might just need when writing in assembly
<deesix>I was confusing it with %0nnn and friens
<deesix>*friends
<OriansJ>which is natural when you don't see hex-literals all that often.
<OriansJ>M2-Planet only generates them when a string can't be expressed as a raw string;
***ChanServ sets mode: +o rekado_
***dddddd_ is now known as dddddd
***deesix_ is now known as deesix