Message from @meratrix

Discord ID: 429761469173727253


2018-03-31 21:33:38 UTC  

That can also be helpful.

2018-03-31 21:34:00 UTC  

That's what I do when debugging homebrew on my 3DS.

2018-03-31 21:34:15 UTC  

I'm gonna try with gdb -tui

2018-03-31 21:35:59 UTC  

It's one of the most basic things you want when coding asm, being able to see exactly what's on the stack, what the registers contain, see each instruction executing.

2018-03-31 21:36:43 UTC  

Another tool to use, **valgrind**.

2018-03-31 21:37:14 UTC  

Since you're writing asm, you could just as easily be corrupting all the memory and not realize it until way after.

2018-03-31 21:40:01 UTC  

Thanks, will look into this stuff

2018-03-31 21:40:35 UTC  

Also, gave me a bit of a heart attack when you said corrupting memory and so immediately backed up the previous two programs I wrote last night for this class.

2018-03-31 21:40:51 UTC  

Valgrind is a VM that does memory checking, it can call gdb to debug a program that appears to be misbehaving.

2018-03-31 21:41:31 UTC  

Corrupting RAM; I imagine you're storing the code in a more permanent storage, no?

2018-03-31 21:41:43 UTC  

yeah, just gave me a freak out for a second

2018-03-31 21:41:50 UTC  

Is that code running in kernel mode? Or user mode?

2018-03-31 21:42:27 UTC  

I'm assuming user mode

2018-03-31 21:53:12 UTC  

Well either you're running it as a regular application under an already running OS, or you're chainloading it via grub during boot.

2018-03-31 21:53:55 UTC  

Okay, definitely the first one.

2018-03-31 21:56:02 UTC  

So what are you trying to accomplish? Reading a string and adding its bytes together?

2018-03-31 21:56:58 UTC  

read in five numbers, sum them, print result.

2018-03-31 21:58:20 UTC  

You're using `scanf` with `"%s"` though.

2018-03-31 21:58:25 UTC  

oh shit

2018-03-31 21:58:29 UTC  

I forgot to change that

2018-03-31 21:58:38 UTC  

lol

2018-03-31 21:58:43 UTC  

That's why I said, write the C code first.

2018-03-31 21:59:17 UTC  

I was using my previous one as a template because that also had a loop, and that was for a string.

2018-03-31 21:59:37 UTC  

I mean, I still have a segfault, but that would have caused other problems obviously.

2018-04-01 04:31:48 UTC  

https://cdn.discordapp.com/attachments/423219052849397773/429860412595372033/1519943201705.jpg

2018-04-01 21:19:51 UTC  

@meratrix why more js

2018-04-01 21:19:59 UTC  

js should be left in a ditch

2018-04-01 21:20:04 UTC  

cause js is best bs

2018-04-01 21:20:04 UTC  

and never be talked about

2018-04-01 21:20:10 UTC  

JS == BS

2018-04-01 21:20:17 UTC  

Shitting on JS is the only way some JS programmers can cope with their job.

2018-04-01 21:20:29 UTC  

Keeps them from offing themselves.

2018-04-01 21:20:38 UTC  

<:think_hang:378717098903470080>

2018-04-01 21:20:49 UTC  

<:super_edgy:426099058466095119>

2018-04-01 23:40:44 UTC  

2018-04-01 23:40:56 UTC  

@meratrix 👌

2018-04-02 00:20:00 UTC  

Then why do some JS coders spend so many time shitting on other lower level languages?

2018-04-02 00:29:53 UTC  

Cause everyone's got a salty side to them.

2018-04-02 00:49:48 UTC  

^

2018-04-02 02:00:04 UTC  

Because they don't know any better.