When debugging x86 assembly code in VS2013, I needed to check the contents of the FLAGS register. However, when I've enabled "Flags" in Register Window, I got:
OV = 0 UP = 0 EI = 1 PL = 1 ZR = 0 AC = 1 PE = 0 CY = 1
Those don't correspond to typical ODITSZAPC flags of x86; can anyone explain to me what's going on? Are those just weird names for the same flags?
I have a 64-bit Core i7; can it affect the displayed names?
| Overflow | OV |
| Direction | UP |
| Interrupt | EI |
| Sign | PL |
| Zero | ZR |
| Auxiliary | AC |
| Parity | PE |
| Carry | CY |
MSDN reference
Yes of course they are the same flags, what else?
But those really are misleading. When UP=1 it's actually reverse back direction (STD), also when PL=1 it's actually sign/negative. Why did VS designer tried to break ASM-thing that ain't broken for ages was beyond my comprehension though.
The same way in GNU's gdb, they called instruction pointer (IP) as $pc, DWORD/DD as word (w), WORD/DW as half-word (h), and QUADWORD/DQ as (g) from GIANT??
C++ Programmers are really weird, they liked to break convention for the sake of it.
Related
20 days ago I've successfully provisioned for ESP-32 and work fine with this device.
Today I've successfully provisioned the second ESP-32 chip on another computer:
5.40 MiB / 5.40 MiB [------------------------------------] 100.00% 14.69 MiB p/s
looking for available hardware identities on disk
no hardware identities found on disk, claiming new hardware identity
Flashing device on port /dev/ttyUSB0
+--------------------------+--------------------------------------+
| SETTING | VALUE |
+--------------------------+--------------------------------------+
| Firmware | v1.0.2 |
| Device Model | esp32-4mb |
| Hardware ID | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
| Hardware Batch & Seq. No | 2020-11-10#524 |
| context | remote |
| broker.host | device.toit.io |
| broker.cn | device.toit.io |
| broker.port | 9426 |
| wifi.ssid | SureDemo |
| wifi.password | suremote |
+--------------------------+--------------------------------------+
erasing device flash
successfully erased device flash
writing device partitions
successfully written device partitions
reading hardware chip information
successfully read hardware chip information
+--------------------------+--------------------------------------+
| SETTING | VALUE |
+--------------------------+--------------------------------------+
| factory device model | esp32-4mb |
| factory firmware version | v1.0.2 |
| chip ID | |
+--------------------------+--------------------------------------+
device was successfully flashed
However, I cannot start the application on this device:
michael_k # michaelk: ~ /toit_apps/Hsm2/tests $ toit run test_hsm_switch_async_4.toit
No default device set. Provide the device name (with the --device flag) to the command
michael_k # michaelk: ~ /toit_apps/Hsm2/tests $
I realized that this new device needs to be given a different name from my default device micrcx-1. By the way, I can see my first appliance:
michael_k # michaelk: ~ /toit_apps/Hsm2/tests $ toit devices
+--------------------------------------+----------+-------------------+----------+
| DEVICE ID | NAME | LAST SEEN | FIRMWARE |
+--------------------------------------+----------+-------------------+----------+
| XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | micrcx-1 | Apr 29 2021 04:05 | v1.0.2 |
+--------------------------------------+----------+-------------------+----------+
michael_k#michaelk:~/toit_apps/Hsm2/tests$
So, the question is: how to give a name to a new additional device and how to run an application on it?
Thanks in advance, MK
PS. Naturally, I could be wrong, but as far as I remember, the name of the first device was assigned by toit system automatically. I had nothing to do with this. micrcx is my computer's identifier.
It might be that your device wasn't claimed yet.
In the current release (but hopefully not in future releases), provisioning a device only puts the Toit framework on the device. At this point it is not yet associated with your account and must be claimed.
You can simply run:
toit device claim <hardware-ID> or toit device claim <hardware-ID> --name=<some-name>.
If no name is provided, then the system generates one. Typically these are built out of two words, for example nervous-plastic. You can always change the names at a later point.
Alternatively you can claim the device in the web UI. There is a "CLAIM OR REPLACE DEVICE" button on the top right of the "Devices" view.
FYI: I have edited your post to remove the hardware ID of the new device, so nobody else claims the device in the meantime.
I'm writing a grammar for parsing PlantUML State diagrams and have the following doubt:
I had:
transition: STATE arrow STATE (":" event? guard? action?)? "\n"
arrow: ("->" | "-->" | "-left->" | "-right->" | "-up->" | "-down->")
But had to change to:
transition: STATE ("->" | "-->" | "-left->" | "-right->" | "-up->" | "-down->") STATE (":" event? GUARD? action?)? "\n"
Because, for my application, I don't need nor care which type of arrow is used; it is sufficient to know that an arrow was there to form the transition.
The question is: Is there a way to split the transition rule in other more manageable rules without the arrow type appearing in the parsed tree?
Full file at https://github.com/thomedes/PlantUML-Lark-EBNF. Feel free to comment / criticize. Trying to learn here 🤓
After RTFM, I've found that terminals whose name begins with underscore are not output to the tree, so I've changed it to:
transition: STATE _ARROW STATE (":" event? GUARD? ACTION?)? "\n"
_ARROW: "->" | "-->" | "-left->" | "-right->" | "-up->" | "-down->"
And now it works fine.
Not marking this as an accepted answer because I'm sure someone with more experience could give a better answer.
# Sets the attributes to an input differential pin pair (din)
NET <din_p> LOC=<AE7> | IOSTANDARD=<LVDS_25> |IOBDELAY=<NONE/BOTH/IBUF/IFD> | DIFF_TERM=<TRUE>;
NET <din_n> LOC=<AF7> | IOSTANDARD=<LVDS_25> | IOBDELAY=<NONE/BOTH/IBUF/IFD> | DIFF_TERM=<TRUE>;
even when I give IOBDELAY=NONE, the error persists
Could someone tell me where I am going wrong ?
This syntax was taken from Language templates for IBUFDS
yea it had to do with syntax .
NET "din_p" LOC="AG6" | IOSTANDARD="LVDS_25" | IOBDELAY=NONE | DIFF_TERM=TRUE;
it works this way
Is it possible to use different tables based on previous steps?
So suppose I have something like
When I choose from a <list> of things
And I run a <test> from that thing chosen with special <parameter>
Examples:
|list|
| a |
| b |
| a |
| test | parameter |
| mytest1 | myparameter1 |
| mytest2 | myparameter2 |
| b |
| test | parameter|
| mytest1 | myparameter3 |
| mytest2 | myparameter4 |
Is this possible and what would be the correct structure?
No its not, and it is a very bad idea. Generally when you want to do programming in your scenarios, you should do it by
Giving it a name
Pushing the programming down into the step definitions
In this particular case you seem to want to be doing some sort of exhaustive testing, where you try a single operation under a number of different conditions. Cucumber is not appropriate for this sort of testing. Instead find a way to do these sort of tests at a lower level of abstraction e.g. a unit test.
The main reason for not doing exhaustive testing in Cucumber is the runtime cost. As a rough rule of thumb each integration test (Cucumber) has a run time cost of hundreds of unit tests (maybe thousands of good unit tests).
I am working on a book with many images, and I want to ensure that I place each picture only once. Is there a way to tell indesign to to check if image exist before placing it? Or a way to define a preflight profile for it?
Thank you,
Omer
You should be able to see a list in the links panel.
It shows the number of times and the page number it appears on.
example:
Name | ! | Pg |
--------------------|---|----|
my-image.psd (2) | | |
my-image.psd | | 1 |
my-image.psd | | 4 |